win32api ใหม่เก่า
หน้านี้มีรายการลิงก์ไปยังส่วนย่อยของโพสต์ของบล็อกที่มีชื่อเสียงของ Raymond Chen เรื่องเก่าใหม่ ชุดย่อยมี จำกัด ส่วนใหญ่ไปยัง win32api และบางสิ่งที่เกี่ยวข้องกับ com
เหตุผลที่ฉันรักษาหน้านี้คือมันมักจะให้ข้อมูลที่หายไปใน MSDN หรือที่อธิบายไว้ในรูปแบบที่เป็นความลับและเนื่องจากบล็อกไม่สามารถค้นหาได้ง่าย
ลิงค์ที่นี่แบ่งตามหัวข้อแทนที่จะเป็นลำดับตามลำดับเวลา บางครั้งเมื่อเหมาะสมอาจมีการโพสต์เดียวในหลายหมวดหมู่
ในบางกรณี (ค่อนข้างหายาก) ลิงก์ไปยังแหล่งข้อมูลอื่น ๆ จะรวมอยู่หากพบว่ามีประโยชน์
คำเตือน: ฉันไม่ได้อ้างสิทธิ์ในการประพันธ์เนื้อหาที่เชื่อมโยงใด ๆ นี่เป็นเพียงการจัดระเบียบที่มีประโยชน์ของบทความที่ยิ่งใหญ่ที่เรย์มอนด์เขียนมาหลายปี
สารบัญ
- กระบวนการและเธรด
- กระบวนการ
- ด้าย
- พูลเธรด
- เธรดความสัมพันธ์ของวัตถุ
- สแต็คด้าย
- เส้นใย
- การซิงโครไนซ์
-
WaitOnAddress()
-
WaitForMultipleObjects()
และญาติ - ล็อครูปแบบ
- DLLS
- ทรัพยากร
- ทรัพยากรบิตแมปและไอคอน
- เทมเพลตบทสนทนา
- เทมเพลตเมนูและทรัพยากรเร่งความเร็ว
- ทรัพยากรสตริง
- เทมเพลตเวอร์ชัน
- ข้อมูลและทรัพยากรที่กำหนดเอง
- แอปพลิเคชัน (โดยรวม)
-
HWND
(มุมมองทั่วไป)- ลำดับชั้นของ windows
- รูปแบบหน้าต่าง
- ชั้นเรียนหน้าต่าง
- หน้าต่างระดับบนสุด
- กรอบหน้าต่างและคำบรรยาย
- DWM
- บทสนทนา
- บทสนทนาที่ซ้อนและฝังตัว
- บทสนทนาทั่วไป
- ระบบควบคุม
- ผู้จัดการกล่องโต้ตอบ
- รูปแบบ
- แผ่นทรัพย์สิน
- การควบคุม
- การควบคุมภาพเคลื่อนไหว
- ปุ่ม
- กล่องคอมโบ
- แก้ไขการควบคุม
- รายการมุมมอง
- การควบคุมข้อความที่อุดมไปด้วย
- แถบเลื่อน
- การควบคุมแบบคงที่
- แถบเครื่องมือ
- คำแนะนำเครื่องมือ
- แทร็กบาร์
- มุมมองรายการต้นไม้
- การประมวลผลข้อความ
- ข้อความเฉพาะ
- การแจ้งเตือน
- การก่อสร้างและการทำลายหน้าต่าง
- ข้อความเรขาคณิตหน้าต่าง
- ข้อความการทาสีหน้าต่าง
- ข้อความโฟกัสหน้าต่าง
- ข้อความแป้นพิมพ์
- ข้อความเมาส์
- ข้อความโต้ตอบ
- ข้อความหน้าต่างอื่น ๆ
- ข้อความระบบ
- GDI
- เคอร์เซอร์
- แปรง
- ปากกา
- บิตแมป
- หมวด
-
LockWindowUpdate()
- องค์ประกอบมาตรฐานการวาดภาพ
-
UXTHEME.DLL
- มอนิเตอร์หลายตัว
- การเข้าถึงได้
- com
- ประกาศอินเทอร์เฟซ COM
- com อพาร์ทเมนท์
- com การเริ่มต้น
- com Static Store
- com marshaling
- การจัดการข้อผิดพลาด com
- อินเทอร์เฟซแบบอะซิงโครนัส
- คำแนะนำ
- com strings
- ตัวแปร com
-
IUnknown
-
IMoniker
-
ICallback
-
IContextMenu
-
IFileDialog
-
IMultiLanguage
-
INamespaceWalk
-
IStream
-
IVirtualDesktopManager
- คลิปบอร์ด
- ลากและวาง
- การแจงนับ
- เปลือก
- สิ่งที่ไม่มีหมวดหมู่ com
- หน่วยความจำ
- อินพุตและเอาต์พุต
- อินพุตและเอาต์พุตแบบอะซิงโครนัส
- ไฟล์และไดเรกทอรี
- ACL
- สิทธิ์การรักษาความปลอดภัยคุณลักษณะและตัวระบุ
- การลงทะเบียน
- สตริงและสถานที่
- บริการ NT
- ไม่มีหมวดหมู่
กระบวนการและเธรด
กระบวนการ
-
CreateProcess
ไม่รอกระบวนการเริ่มต้น - ทำไมฟังก์ชัน
CreateProcess
จึงแก้ไขบรรทัดคำสั่งอินพุต - ทำไมผู้คนถึงล็อคการโทร
CreateProcess
? - ปิดการใช้งานกล่องโต้ตอบข้อผิดพลาดของโปรแกรม
- ฉันจะส่งข้อมูลจำนวนมากไปยังกระบวนการเมื่อเริ่มต้นได้อย่างไร
- อะไรคือจุดประสงค์ของพารามิเตอร์
hPrevInstance
เพื่อ WinMain
? -
RunAsInvoker
เป็นความลับหรือไม่การตั้งค่า UAC ที่สูงขึ้นหรือไม่? - ฉันจะป้องกันไม่ให้กระบวนการเด็กแสดงกล่องโต้ตอบการรายงานข้อผิดพลาดของ Windows ได้อย่างไร
-
WriteProcessMemory
ประสบความสำเร็จในการเขียนเป็นลายลักษณ์อักษรเพื่อความทรงจำแบบอ่านอย่างเดียวได้อย่างไร? - เป็นความคิดที่ดีหรือไม่ที่จะให้
WriteProcessMemory
จัดการการป้องกันหน้าสำหรับฉัน? - ฉันจะเปิดกระบวนการที่ไม่ได้รับการคัดเลือกได้อย่างไรจากกระบวนการยกระดับของฉัน Redux
- ฉันจะตรวจสอบระดับความสมบูรณ์ของกระบวนการของฉันได้อย่างไร
- เป็นความจริงหรือไม่ที่การยกข้อยกเว้นที่มีโครงสร้างจากตัวจัดการข้อยกเว้นที่มีโครงสร้างสิ้นสุดกระบวนการ?
- วิธีการสร้างกระบวนการในวัตถุงานโดยตรงและปราศจากข้อผิดพลาดมากขึ้น
ด้าย
- เธรดที่ไม่ถูกต้องและรหัสกระบวนการ
- ทำไมกระทู้ของฉันถึงไม่ดี? ทั้งหมดที่ฉันทำคือรอมัน!
- จะเกิดอะไรขึ้นถ้าคุณเพียงแค่กลับจากการเรียกกลับเธรดที่ส่งไปยัง
_beginthread
และ _beginthreadex
? - ทำไมคุณไม่ควรระงับเธรด
- อันตรายจากการนอนบนด้าย UI
- ในการติดตามคิวข้อความ
- การแจกแจงเธรดในกระบวนการ
- งานอินเตอร์เฟสของผู้ใช้ Win32 นั้นมีเธรดเดี่ยวโดยเนื้อแท้
- การชะลอการปิดที่จับเธรดเป็นเวลานานแค่ไหนหลังจากออกจากเธรดออกไป?
- ถ้าฉันเรียก
GetExitCodeThread
สำหรับเธรดที่ฉันรู้ว่าออกไปแล้วทำไมมันถึงยังคงพูดว่า STILL_ACTIVE
? - มีปัญหากับ
CreateRemoteThread
ในระบบ 64 บิตหรือไม่? - ฟังก์ชั่น
TerminateThread
แบบซิงโครนัสหรือไม่? - การลบ
TerminateThread
ออกจากรหัสที่รอให้วัตถุงานว่างเปล่า - จุดของ
FreeLibraryAndExitThread
คืออะไร? - จะเกิดอะไรขึ้นถ้าฉันให้ค่าที่ขัดแย้งกันสำหรับกองซ้อนและกองสำรองสแต็ก?
พูลเธรด
- พารามิเตอร์
msWindowLength
เป็นอย่างไรกับ SetThreadpoolTimer
หมายถึงอะไร? - อะไรคือความแตกต่างระหว่าง
CreateTimerQueueTimer
และ SetThreadpoolTimer
? - วิธีหลีกเลี่ยงการเข้าถึงหน่วยความจำอิสระเมื่อยกเลิกการโทรกลับพูลเธรด
- หลีกเลี่ยงการหยุดชะงักเมื่อยกเลิกการโทรกลับพูลเธรดตอนที่ 1: ข้อมูลการโทรกลับภายนอก
- หลีกเลี่ยงการหยุดชะงักเมื่อยกเลิกการโทรกลับพูลเธรดตอนที่ 2: อ้างอิงกลับไปยังวัตถุที่มีอยู่
- Gotcha: ตัวจับเวลาเป็นระยะของ Threadpool จะไม่รอให้เห็บก่อนหน้าเสร็จสมบูรณ์
- ทำไมฉันถึงได้รับข้อยกเว้นจากพูลเธรดในระหว่างการปิดกระบวนการ?
- จะเกิดอะไรขึ้นกับค่าที่ส่งคืนจากฟังก์ชั่นที่ส่งผ่านไปยัง
QueueUserWorkItem
? - แบบจำลองทางจิตสำหรับ
StartThreadpoolIo
- ฉันจะตรวจพบได้อย่างไรว่ารายการงานพูลเธรดใช้เวลานานเกินไป?
- ฉันจะปิดพูลเธรดและยกเลิกงานทั้งหมดที่ถูกจัดคิวได้อย่างไร
เธรดความสัมพันธ์ของวัตถุ
- เธรดความสัมพันธ์ของวัตถุอินเทอร์เฟซผู้ใช้ส่วนที่ 1: ที่จับหน้าต่าง
- เธรดความสัมพันธ์ของวัตถุอินเทอร์เฟซผู้ใช้ส่วนที่ 2: บริบทของอุปกรณ์
- เธรดความสัมพันธ์ของวัตถุอินเทอร์เฟซผู้ใช้ส่วนที่ 3: เมนูไอคอนเคอร์เซอร์และตารางเร่งความเร็ว
- เธรดความสัมพันธ์ของวัตถุอินเทอร์เฟซผู้ใช้ส่วนที่ 4: วัตถุ GDI และหมายเหตุอื่น ๆ เกี่ยวกับความสัมพันธ์
- เธรดความสัมพันธ์ของวัตถุอินเทอร์เฟซผู้ใช้ส่วนที่ 5: การทำความสะอาดวัตถุ
- เธรดความสัมพันธ์ของวัตถุอินเทอร์เฟซผู้ใช้: ภาคผนวก
สแต็คด้าย
- ฉันจะขยายสแต็คของเธรดได้อย่างไร
- การใช้เส้นใยเพื่อขยายสแต็คของเธรดที่รันไทม์ตอนที่ 1
- การใช้เส้นใยเพื่อขยายสแต็คของเธรดที่รันไทม์ตอนที่ 2
- การใช้เส้นใยเพื่อขยายสแต็คของเธรดที่รันไทม์ตอนที่ 3
- การใช้เส้นใยเพื่อขยายสแต็คของเธรดที่รันไทม์ตอนที่ 4
- การใช้เส้นใยเพื่อขยายสแต็คของเธรดที่รันไทม์ตอนที่ 5
- การใช้เส้นใยเพื่อขยายสแต็คของเธรดที่รันไทม์ตอนที่ 6
- การเปรียบเทียบเส้นใยกับเธรดเพื่อจุดประสงค์ในการขยายสแต็กของเธรดที่รันไทม์
- กำหนดประมาณจำนวนพื้นที่สแต็กตอนที่ 1
- การพิจารณาประมาณว่าพื้นที่สแต็กมีประมาณเท่าใดตอนที่ 2
เส้นใย
- จะเกิดอะไรขึ้นกับเส้นใยที่วิ่งบนด้ายเมื่อเธรดออก?
- เป็นเรื่องปกติที่จะใช้เส้นใย แต่ทุกคนต้องอยู่บนกระดานด้วยแผน
- เส้นใยไม่มีประโยชน์อีกต่อไป มีเพียงมุมเดียวที่ยังคงมีประโยชน์สำหรับเหตุผลที่ไม่เกี่ยวข้องกับเส้นใย
การซิงโครไนซ์
- ทำความเข้าใจกับผลที่ตามมาของ
WAIT_ABANDONED
- เหตุการณ์ Windows Keyed ส่วนที่สำคัญและคุณสมบัติการซิงโครไนซ์ Vista ใหม่
- การรวมคิวงานของเหตุการณ์ที่แตกต่างกันสั่งซื้อไม่สำคัญกับเหตุการณ์การรีเซ็ตอัตโนมัติ
- SRW ล็อคเป็นอย่างไรโดยเฉพาะอย่างยิ่งเมื่อมีทั้งผู้อ่านและนักเขียน?
- คุณสามารถใช้ไฟล์เป็นวัตถุการซิงโครไนซ์ได้เช่นกัน
- ฉันสามารถรอให้เหตุการณ์เคอร์เนลกลายเป็น คนที่ไม่ได้ลงนามได้หรือไม่ ?
- หากผู้อ่าน/นักเขียน Slim (
SRWLOCK
) จำไม่ได้ว่าใครเป็นเจ้าของล็อคที่ใช้ร่วมกันนั่นหมายความว่ามันโอเคที่จะได้รับมันซ้ำ?
WaitOnAddress()
-
WaitOnAddress
ให้คุณสร้างวัตถุการซิงโครไนซ์จากตัวแปรข้อมูลใด ๆ แม้แต่ไบต์ - การใช้อุปสรรคการซิงโครไนซ์ในแง่ของ
WaitOnAddress
- การใช้ส่วนที่สำคัญในแง่ของ
WaitOnAddress
- ขยายส่วนวิกฤตของเราตาม
WaitOnAddress
เพื่อสนับสนุนการหมดเวลา - การเปรียบเทียบ
WaitOnAddress
กับ Futexes (Futexi? Futexen?) - การสร้างสัญญาณจาก
WaitOnAddress
- การสร้างเซมาฟอร์ที่มีจำนวนสูงสุดจาก
WaitOnAddress
- การสร้างกิจกรรมการรีเซ็ตด้วยตนเองจาก
WaitOnAddress
- การสร้างกิจกรรมการรีเซ็ตอัตโนมัติจาก
WaitOnAddress
WaitForMultipleObjects()
และญาติ
-
MsgWaitForMultipleObjects
และสถานะคิว - คุณสามารถโทรหา
MsgWaitForMultipleObjects
ที่มีด้ามจับเป็นศูนย์ - การสูบข้อความขณะรอเป็นระยะเวลาหนึ่ง
- การรอที่จับทั้งหมดด้วย
MsgWaitForMultipleObjects
เป็นข้อบกพร่องที่รอให้เกิดขึ้น - ทำไม
WaitForMultipleObjects
return ERROR_INVALID_PARAMETER
เมื่อพารามิเตอร์ทั้งหมดดูถูกต้องสำหรับฉัน? - หากวัตถุมากกว่าหนึ่งชิ้นทำให้
WaitForMultipleObjects
กลับมาฉันจะหาข้อมูลเกี่ยวกับอีกฝ่ายได้อย่างไร - อะไรคือจุดที่ผ่านเหตุการณ์ที่ไม่เคยมีสัญญาณไปยัง
MsgWaitForMultipleObjects
?
ล็อครูปแบบ
- ล็อครูปแบบผู้ผลิต/ผู้บริโภคจำนวนมากฟรี: คิวงานที่มีงานรวมตัวกัน
- ล็อครูปแบบผู้ผลิต/ผู้บริโภคจำนวนมากฟรี: คิวงานที่คนสุดท้ายชนะ
- ล็อครูปแบบผู้ผลิต/ผู้บริโภคจำนวนมากฟรี: คิวการทำงานของเหตุการณ์ที่ไม่สามารถปรับได้เหมือนกัน
- ล็อครูปแบบผู้ผลิต/ผู้บริโภคจำนวนมากฟรี: คิวงานของเหตุการณ์ที่แตกต่างกันสั่งซื้อไม่สำคัญ
- ล็อครูปแบบผู้ผลิต/ผู้บริโภคจำนวนมากฟรี: คิวงานของเหตุการณ์ที่แตกต่างกัน FIFO
- ล็อครูปแบบผู้ผลิต/ผู้บริโภคจำนวนมากฟรี: คิวงานของเหตุการณ์ที่แตกต่างกันการสั่งซื้อไม่สำคัญคำถามติดตาม
DLLS
- อย่าเชื่อถือที่อยู่ผู้ส่ง
- ทำไมฉันไม่สามารถ
GetProcAddress
ฟังก์ชั่นที่ฉัน dllexport'ed ได้? -
HINSTANCE
และ HMODULE
แตกต่างกันอย่างไร? - การเข้าถึง
HINSTANCE
ของโมดูลปัจจุบันจากห้องสมุดคงที่ -
LoadLibraryEx(DONT_RESOLVE_DLL_REFERENCES)
มีข้อบกพร่องพื้นฐาน - ทำไม DLLS ถึงไม่โหลดในคำสั่ง "ผิด"?
- ฟังก์ชั่น DLL ส่งออกในหน้าต่าง 32 บิตอย่างไร
- ฟังก์ชั่นที่ส่งออกซึ่งเป็นผู้ส่งต่อจริงๆ
- ทบทวนวิธีที่ DLL ส่งออกได้รับการแก้ไขสำหรับหน้าต่าง 32 บิต
- ชื่อในห้องสมุดนำเข้าได้รับการตกแต่งด้วยเหตุผล
- จะเกิดอะไรขึ้นเมื่อคุณเข้าใจผิด dllimport?
- ปัญหาที่เกี่ยวข้องกับการบังคับให้ต้นขั้วถูกสร้างขึ้นสำหรับฟังก์ชั่นนำเข้า
- การจัดสรรและการปลดปล่อยหน่วยความจำในขอบเขตโมดูล
- การส่งต่อ DLL ไม่เหมือนกับการโหลดล่าช้า
- DLL นำเข้าคำใบ้คืออะไร?
- DLL นำเข้ามีผลผูกพันคืออะไร?
- จุดของ
FreeLibraryAndExitThread
คืออะไร? - ห้องสมุดที่โหลดผ่าน
LOAD_LIBRARY_AS_DATAFILE
(หรือธงที่คล้ายกัน) ไม่ได้เล่นในเกมโมดูลกวางเรนเดียร์ใด ๆ - อาจมีปัญหาใด ๆ กับการโทรหา
GetModuleFileNameEx
ในกระบวนการของคุณเองหรือไม่? - ฉันจะระบุได้อย่างไรว่า DLL ของฉันควรแก้ไขการพึ่งพา DLL จากไดเรกทอรีเดียวกับที่ DLL อยู่ใน?
- หลังจากที่ฉันทำ dll ล่าช้า dll อีก dll dll ของฉันเริ่มล่มในรหัสกระบวนการ detach ของมัน
- การปลูก DLL ชนิดต่าง ๆ
- ทำไม
GetModuleInfo
ถึงไม่สามารถสร้างจุดเข้าใช้งานได้ -
SizeOfImage
หมายถึงอะไรในโครงสร้าง MODULEINFO
? - ฉันจะระงับกล่องข้อผิดพลาดที่ปรากฏขึ้นได้อย่างไรเมื่อ
LoadLibrary
ล้มเหลวได้อย่างไร
DllMain()
- เหตุผลบางอย่างที่ไม่ต้องทำอะไรที่น่ากลัวใน
DllMain
ของคุณ - อีกเหตุผลหนึ่งที่ไม่ต้องทำอะไรที่น่ากลัวใน
DllMain
ของคุณ: การหยุดชะงักโดยไม่ตั้งใจ - เหตุผลบางประการที่จะไม่ทำอะไรที่น่ากลัวใน
DllMain
ของคุณตอนที่ 3 - เธรดที่ได้รับการแจ้งเตือน
DLL_PROCESS_DETACH
ไม่จำเป็นต้องเป็นข้อความที่ได้รับ DLL_PROCESS_ATTACH notification
- คุณจะโหลด DLL ได้อย่างไรในระหว่าง
DLL_PROCESS_DETACH
โดยไม่ต้องตระหนักถึงมัน - เมื่อ
DLL_PROCESS_DETACH
บอกคุณว่ากระบวนการออกไปทางออกที่ดีที่สุดของคุณคือการกลับมาโดยไม่ทำอะไรเลย
ทรัพยากร
- คอมไพเลอร์ทรัพยากรเริ่มต้นเป็น
CP_ACP
แม้จะเผชิญกับคำแนะนำที่ละเอียดอ่อนว่าไฟล์คือ UTF-8 - ความสัมพันธ์ระหว่างทรัพยากรโมดูลและวัตถุที่ได้มาจากทรัพยากรในหน้าต่าง 32 บิต
- อะไรคือความแตกต่างระหว่าง
FreeResource
และพูดว่า DestroyAcceleratorTable
- ทรัพยากร PE ต้องอยู่ในแนว 4 ไบต์ แต่นั่นไม่ได้หยุดยั้งผู้คนจากการพยายามจัดตำแหน่งอื่น ๆ
- ฉันจะบอกได้อย่างไรว่ามีคนใช้มาโคร
MAKEINTRESOURCE
เพื่อลักลอบขนจำนวนเต็มภายในตัวชี้? - น่ารังเกียจ Gotcha:
FindResource
และ FindResourceEx
ทรัพยากรบิตแมปและไอคอน
- เหตุใดบิตแมปที่ไม่ขึ้นกับอุปกรณ์จึงกลับหัวกลับหาง?
- รูปแบบของทรัพยากรบิตแมป
- รูปแบบของทรัพยากรไอคอน
- รูปแบบของทรัพยากรไอคอนกลับมาอีกครั้ง
- วิวัฒนาการของรูปแบบไฟล์ ICO ส่วนที่ 1: จุดเริ่มต้นขาวดำ
- วิวัฒนาการของรูปแบบไฟล์ ICO ตอนที่ 2: ตอนนี้เป็นสี!
- วิวัฒนาการของรูปแบบไฟล์ ICO ส่วนที่ 3: ภาพผสมอัลฟ่า
- วิวัฒนาการของรูปแบบไฟล์ ICO ส่วนที่ 4: ภาพ PNG
- ฉันจะตั้งช่องอัลฟ่าของบิตแมป GDI เป็น 255 ได้อย่างไร
ทรัพยากรสตริงข้อความ
- เหตุใด
FormatMessage
จึงบอกว่า %0
สิ้นสุดข้อความโดยไม่ต้องมีสายใหม่ มันแอบเพิ่มใหม่หรือไม่?
เทมเพลตบทสนทนา
- เกี่ยวกับความยากลำบากในการได้รับเค้าโครงที่สมบูรณ์แบบพิกเซลในเทมเพลตการโต้ตอบ Win32
- วิวัฒนาการของเทมเพลตการโต้ตอบ - เทมเพลตคลาสสิก 32 บิต
- วิวัฒนาการของเทมเพลตการโต้ตอบ - เทมเพลตขยาย 32 บิต
- วิวัฒนาการของเทมเพลตการโต้ตอบ - สรุป
- คอมไพเลอร์ทรัพยากรจะเพิ่มรูปแบบหน้าต่างให้คุณได้อย่างเป็นประโยชน์ แต่ถ้าคุณกำลังสร้างแม่แบบโต้ตอบด้วยตัวคุณเองคุณจะไม่ได้รับความช่วยเหลือ
เทมเพลตเมนูและทรัพยากรเร่งความเร็ว
- วิวัฒนาการของเทมเพลตเมนู: บทนำ
- วิวัฒนาการของเทมเพลตเมนู: เมนูคลาสสิก 32 บิต
- วิวัฒนาการของเทมเพลตเมนู: เมนูขยาย 32 บิต
- รูปแบบของทรัพยากรตารางเร่ง
ทรัพยากรสตริง
- รูปแบบของทรัพยากรสตริง
-
LoadString
สามารถโหลดสตริงด้วย nulls ฝังตัว แต่ฟังก์ชั่น wrapper ของคุณอาจไม่
เทมเพลตเวอร์ชัน
- วิวัฒนาการของทรัพยากรเวอร์ชัน - ทรัพยากรเวอร์ชัน 32 บิต
- วิวัฒนาการของทรัพยากรเวอร์ชัน - ทรัพยากรเวอร์ชัน 32 บิตเสียหาย
ข้อมูลและทรัพยากรที่กำหนดเอง
- รูปแบบของข้อมูลและทรัพยากรที่กำหนดเอง
แอปพลิเคชัน (โดยรวม)
- หน้าต่างใดที่ปรากฏในรายการ
Alt+Tab
? - Windows Vista เปลี่ยนลำดับ
Alt+Tab
เล็กน้อย - งานอินเตอร์เฟสของผู้ใช้ Win32 นั้นมีเธรดเดี่ยวโดยเนื้อแท้
-
STARTF_USESHOWWINDOW
แทนที่พารามิเตอร์ที่ส่งไปยัง ShowWindow
เมื่อใด -
WaitForInputIdle
ควรเรียกว่า WaitForProcessStartupComplete
จริงๆ -
WaitForInputIdle
รอเธรดใด ๆ ซึ่งอาจไม่ใช่เธรดที่คุณสนใจ - การประชุมสำหรับการจัดการที่จับมาตรฐานคืออะไร?
- มือจับมาตรฐานมีความหมายจริงๆสำหรับโปรแกรมแบบเธรดเดี่ยว
- หากมีเพียง DLLs เท่านั้นที่จะได้รับการแจ้งเตือน
DllMain
, EXE จะได้รับการแจ้งเตือนเมื่อสร้างเธรด (ตัวอย่าง) ได้อย่างไร
บรรทัดคำสั่ง
- คำแรกในบรรทัดคำสั่งคือชื่อโปรแกรมโดยการประชุมเท่านั้น
- ฟังก์ชั่น
CommandLineToArgvW
มีจุดประสงค์เพื่อใช้อย่างไร? - เกิดอะไรขึ้นกับการรักษาเครื่องหมายคำพูดที่แปลกและ backslashes โดย
CommandLineToArgvW
แถบงาน
- ฉันจะป้องกันไม่ให้ผู้ใช้ตรึงโปรแกรมของฉันไปยังแถบงานได้อย่างไร
- แทนที่จะสร้างบางสิ่งบางอย่างแล้วพยายามซ่อนมันอย่าสร้างมันขึ้นมาตั้งแต่แรก (ไอคอนถาด)
- จะเป็นอย่างไรถ้าแอปพลิเคชันของฉันเป็นแอปพลิเคชันสองตัวที่รวมอยู่ในไฟล์เดียวและฉันต้องการให้รวบรวมเป็นสองกลุ่มในแถบงานใน Windows 7
- ฉันจะปรับแต่งวิธีการจัดกลุ่มแอปพลิเคชันของฉันในแถบงานได้อย่างไร
- แสดงการซ้อนทับบนปุ่มแถบงาน
- แสดงปุ่มควบคุมบนหน้าต่างตัวอย่างแถบงานของคุณ
- แสดงภาพขนาดย่อที่กำหนดเองสำหรับแอปพลิเคชันของคุณ (และในขณะที่คุณอยู่ที่นี่ตัวอย่างสดสดที่กำหนดเอง)
- ฉันจะสอบถามตำแหน่งของแถบงานบนจอภาพรองได้อย่างไร
- โปรแกรมนั้นจัดการกับแถบงานของฉันได้อย่างไรเมื่อฉันติดตั้ง
- ถ้าฉันมีสองโปรแกรมที่มีเหตุผลเป็นแอปพลิเคชันเดียวและฉันต้องการให้พวกเขาได้รับการปฏิบัติเป็นกลุ่มเดียวในแถบงาน
- เหตุใดไอคอนแถบงานสำหรับหน้าต่างที่จัดกลุ่มจึงเปลี่ยนเป็นสิ่งที่แปลก
HWND
(มุมมองทั่วไป)
- การเป็น Unicode เป็นอย่างไร
- ฉันจะรับที่อยู่ขั้นตอนหน้าต่างจริงและไม่ใช่ thunk ได้อย่างไร?
- ค่าแปลก ๆ เหล่านี้ส่งคืนจาก
GWLP_WNDPROC
คืออะไร? - ไบต์โบนัสหน้าต่างที่
GWLP_USERDATA
- ความแตกต่างระหว่าง
WM_DESTROY
และ WM_NCDESTROY
คืออะไร? - การส่งข้อความ
WM_DESTROY
เป็นเหมือนการเล่นตลกเรียกคนที่แกล้งทำเป็นตำรวจ - ชีวิตลับของ
GetWindowText
- เหตุใดกฎสำหรับ
GetWindowText
จึงแปลกมาก? - การวาดภาพเฉพาะเมื่อหน้าต่างของคุณมองเห็นได้บนหน้าจอ
- พิจารณาว่าหน้าต่างของคุณครอบคลุมหรือไม่
- ได้รับขนาดและตำแหน่งของหน้าต่างในขณะที่ลดลง
- เหตุใดการเรียก
SetForegroundWindow
ทันทีตามด้วย GetForegroundWindow
ไม่ส่งคืนหน้าต่างเดียวกันกลับมา? - Windows ตัดสินใจอย่างไรว่าหน้าต่างที่สร้างขึ้นใหม่ควรใช้เลย์เอาต์ LTR หรือ RTL ได้อย่างไร
ลำดับชั้นของ windows
- มีอะไรพิเศษเกี่ยวกับหน้าต่างเดสก์ท็อป?
- ขีด จำกัด การทำรังหน้าต่างคืออะไร?
-
HWND_TOP
และ HWND_TOPMOST
แตกต่างกันอย่างไร - หน้าต่างสามารถมีพ่อแม่หรือเจ้าของ แต่ไม่ใช่ทั้งสองอย่าง
- เหตุใดการควบคุมของฉันจึงส่งการแจ้งเตือนไปยังหน้าต่างที่ไม่ถูกต้องหลังจากที่ฉันชดเชยมัน?
-
WindowFromPoint
, ChildWindowFromPoint
, RealChildWindowFromPoint
มันจะสิ้นสุดเมื่อใด -
GetParent
เช่นเดียวกับ EnumClaw
แต่มันเป็นฟังก์ชั่นจริง! ( GetAncestor()
, GetWindow()
) - การมีหน้าต่างเจ้าของจากกระบวนการอื่นนั้นยุ่งยาก แต่บางครั้งก็เป็นสิ่งที่ถูกต้องที่จะทำ
- เอกสารสำหรับ
SetParent
พยายามบอกฉันเกี่ยวกับการซิงโครไนซ์สถานะ UI คืออะไร? - แสดงให้เห็นว่าเกิดอะไรขึ้นเมื่อหน้าต่างพ่อแม่และเด็กมีสถานะ UI ที่แตกต่างกัน
- รับหน้าต่างพ่อแม่และเด็กเพื่อให้มีสถานะ UI เดียวกัน
รูปแบบหน้าต่าง
- บิตสไตล์หน้าต่างใดเป็นของใคร?
- ฉันจะระบุได้อย่างไรว่าฉันต้องการให้หน้าต่างของฉันปฏิบัติตามกฎการจัดวางขวาไปซ้ายได้อย่างไร
- เหตุใดการควบคุมแบบคงที่โปร่งใสของฉันจึงไม่โปร่งใส? (
WS_EX_TRANSPARENT
) - เช่นเดียวกับเค้ก
WS_EX_TRANSPARENT
เป็นเรื่องโกหกหรืออย่างน้อยก็ไม่ใช่ความจริงทั้งหมด - ฉันใช้
WS_EX_COMPOSITED
เพื่อกำจัดการเคลื่อนไหวใหม่ของฉัน แต่มันส่งผลให้เกิดการตอบสนองที่เฉื่อยชา - ฉันจะใช้
WS_CLIPCHILDREN
ได้อย่างไรและยังสามารถควบคุมการควบคุมที่มีพื้นหลังโปร่งใสได้อย่างไร
ชั้นเรียนหน้าต่าง
-
HINSTANCE
ส่งผ่านไปยัง CreateWindow
และ RegisterClass
ที่ใช้สำหรับอะไร? - การใช้
HINSTANCE
ที่ไม่ถูกต้องใน RegisterClass
เป็นเหมือนการขโมยข้อมูลประจำตัว - หากฟังก์ชั่น
RegisterClass
เป็นเจ้าของแปรงพื้นหลังที่กำหนดเองทำไมมันถึงรั่วไหล? - การเปลี่ยนคลาสหน้าต่างจะมีผลกับหน้าต่างทั้งหมดที่อยู่ในคลาสนั้น
-
CS_SAVEBITS
ทำอะไร? - สไตล์คลาส
CS_OWNDC
ทำอะไร? - สไตล์คลาส
CS_CLASSDC
ทำอะไร? - การปรับเปลี่ยนสไตล์
CS_NOCLOSE
ส่งผลกระทบต่อหน้าต่างทั้งหมดของชั้นเรียนไม่จำเป็นต้องเป็นวิธีที่เห็นได้ชัดเจนในทันที - ทำไม
PrintWindow
ถึงเกลียด CS_PARENTDC
? เพราะทุกคนเกลียด CS_PARENTDC
! - ทำไม
PrintWindow
ถึงเกลียด CS_PARENTDC
? redux - subclassing ที่ปลอดภัยยิ่งขึ้น
- ชั้นเรียนส่วนตัว superclassing และ subclassing ทั่วโลก
- อะไรทำให้
RealGetWindowClass
เป็นจริงมากกว่า GetClassName
? - เหตุใด
CreateWindowEx
จึงใช้พารามิเตอร์สไตล์ขยายเป็นพารามิเตอร์แรกแทนที่จะเป็นสุดท้าย - ฉันควรใช้
CS_GLOBALCLASS
เมื่อใด - พารามิเตอร์ uidsubclass ต้องไม่ซ้ำกันแค่ไหนเมื่อฉันเรียก
SetWindowSubclass
?
หน้าต่างระดับบนสุด
กรอบหน้าต่างและคำบรรยาย
- รับเมนูคลิกขวาที่กำหนดเองสำหรับไอคอนคำบรรยายภาพ
- การวาดคำบรรยายที่ดูกระฉับอยู่แม้ว่าจะไม่ได้ใช้งานก็ตาม
- ฉันจะระงับการลาก/ปรับขนาดหน้าต่างเต็มรูปแบบสำหรับหน้าต่างเดียวได้อย่างไร
- ฉันจะสลับหน้าต่างระหว่างปกติและเต็มหน้าจอได้อย่างไร
- ฉันจะเปิดใช้งานและปิดการใช้งานการย่อขนาดสูงสุดและปิดปุ่มในแถบคำบรรยายภาพได้อย่างไร
- รับตำแหน่งของปุ่มปิดในแถบชื่อ
- รับตำแหน่งของปุ่มปิดในแถบชื่อเรื่องจาก Windows 2000 หรือ Windows XP
- เหตุใดมิติของหน้าต่างขยายใหญ่กว่าจอภาพจึงมีขนาดใหญ่กว่าจอภาพ
- การสร้างหน้าต่างที่สามารถปรับขนาดได้ในทิศทางเดียว
- ทำไมคุณไม่ส่งต่อ
WM_GETMINMAXINFO
และหนีบผลลัพธ์?
DWM
- เหตุใดโปรแกรมของฉันจึงไม่ได้รับข้อความ
WM_DWMSENDICONICTHUMBNAIL
เมื่อฉันขอการเป็นตัวแทนที่เป็นสัญลักษณ์ - พารามิเตอร์
MARGINS
ไปยังฟังก์ชั่น DwmExtendFrameIntoClientArea
ควบคุมว่าเฟรมจะขยายเข้าไปในพื้นที่ไคลเอนต์ได้ไกลแค่ไหน - ฉันจะระงับภาพเคลื่อนไหวเริ่มต้นที่เกิดขึ้นได้อย่างไรเมื่อฉันซ่อนหรือแสดงหน้าต่างได้อย่างไร
- แสดงภาพขนาดย่อที่กำหนดเองสำหรับแอปพลิเคชันของคุณ (และในขณะที่คุณอยู่ที่นี่ตัวอย่างสดสดที่กำหนดเอง)
- ฉันจะตรวจพบได้อย่างไรว่าหน้าต่างของฉันถูกระงับจากหน้าจอโดยเปลือก ("การปิดบังหน้าต่าง")
บทสนทนา
- ทำไมฉันไม่สามารถสร้างกล่องโต้ตอบได้? มือใหม่ผิดพลาด #1
- ทำไมฉันไม่สามารถสร้างกล่องโต้ตอบได้? มือใหม่ผิดพลาด #2
- การส่งคืนค่าจากขั้นตอนการโต้ตอบ
- ขั้นตอนการโต้ตอบประเภทอื่น
- ขั้นตอนการโต้ตอบประเภทอื่นที่แตกต่างกัน
- คำตอบเริ่มต้นสำหรับกล่องโต้ตอบทุกกล่องคือ "ยกเลิก"
- หมุน z-order
- การใช้คีย์
TAB
เพื่อนำทางใน non-dialogs - การใช้คีย์
TAB
เพื่อนำทางใน non-dialogs, redux - ป้องกันการแก้ไขข้อความควบคุมจากการถูกเลือกอัตโนมัติในกล่องโต้ตอบ
- ผู้ที่ไม่เข้าใจผู้จัดการกล่องโต้ตอบจะถูกนำมาใช้ใหม่อีกครั้ง
- เทคนิคอื่น ๆ ด้วย
WM_GETDLGCODE
-
GetDialogBaseUnits
เป็นหม้อ - เหตุใด
MapDialogRect
Mapping Dialog ectangles จึงไม่มี - เหตุใดกล่องโต้ตอบจึงถูกซ่อนไว้ในขั้นต้น?
- ข้อตกลงกับธง
DS_SHELLFONT
คืออะไร? - ทำไม
DS_SHELLFONT = DS_FIXEDSYS | DS_SETFONT
? - วิธีตั้งค่าโฟกัสในกล่องโต้ตอบ
- อย่าปล่อยให้โฟกัสไปที่การควบคุมที่ปิดการใช้งาน
- ความละเอียดอ่อนในการกู้คืนตำแหน่งหน้าต่างก่อนหน้า
- สิ่งที่คุณรู้อยู่แล้ว: ฉันจะรอจนกว่ากล่องโต้ตอบของฉันจะปรากฏขึ้นก่อนที่จะทำอะไรบางอย่าง?
-
TranslateAccelerator
ทำอะไร? - ถ้าฉันมีกล่องโต้ตอบแบบไม่มีที่เหมาะสมพร้อมตัวเร่งความเร็วที่กำหนดเองซึ่งฉันควรโทรไปก่อน:
IsDialogMessage
หรือ TranslateAccelerator
- การแจ้งเตือนที่อ่อนโยน: ในกล่องโต้ตอบอย่าให้ OK และยกเลิกตัวเร่งความเร็ว
- ทำไมตัวเร่งความเร็วสำหรับการควบคุมที่ซ่อนอยู่ยังคงทำงานอยู่?
- ฉันจะทำให้เครื่องเร่งความเร็วของฉันใช้งานได้อย่างไรเมื่อใช้ในหน้าต่างหลักและไม่ใช่เมื่อผู้ใช้ใช้กล่องโต้ตอบแบบไม่มีที่เหมาะสม
- เหตุใดคีย์
TAB
จึงไม่ทำงานกับตัวควบคุมที่ฉันทำเครื่องหมายเป็น WS_TABSTOP
- คุณไม่สามารถใช้ข้อความ
WM_USER
ในกล่องโต้ตอบได้ - ฉันจะทำกล่องโต้ตอบได้อย่างไรจากการลงรันไทม์
- Dialog Manager คำนวณความกว้างเฉลี่ยของอักขระได้อย่างไร
บทสนทนาที่ซ้อนและฝังตัว
- สไตล์
DS_CONTROL
มีไว้สำหรับอะไร? - หมายเหตุเพิ่มเติมเกี่ยวกับการใช้สไตล์
DS_CONTROL
- ไม่ใช่ความคิดที่ดีที่จะให้การควบคุมหลายครั้งในกล่องโต้ตอบ ID เดียวกัน
- เมื่อฝังกล่องโต้ตอบภายในอีกครั้งตรวจสอบให้แน่ใจว่าคุณไม่ได้สร้างรหัสควบคุมซ้ำโดยไม่ได้ตั้งใจ
- เมื่อปุ่มกดเริ่มต้นถูกเรียกใช้การเรียกใช้กล่องโต้ตอบระดับบนสุด
บทสนทนาทั่วไป
- ทำไม
MessageBox
ของฉันถึงไม่ห่อไว้ในตำแหน่งที่ถูกต้อง? - ฉันจะปรับแต่งส่วนลิงก์ที่ชื่นชอบของกล่องโต้ตอบเปิดไฟล์ได้อย่างไร
- เหตุใดกล่องโต้ตอบไฟล์ทั่วไปจึงเปลี่ยนไดเรกทอรีปัจจุบัน
- คุณสามารถกรองกล่องโต้ตอบไฟล์ทั่วไปด้วย wildcards
- ฉันจะแสดงกล่องโต้ตอบค้นหาเครื่องพิมพ์โดยทางโปรแกรมได้อย่างไร
- เหตุใดรายการเปิดไฟล์ในสแน็ปอินโฟลเดอร์ที่ใช้ร่วมกันแสดงไฟล์ที่เปิดทั้งหมดของฉัน
- การควบคุมร่วมกันสำหรับการเชื่อมต่อส่วนขยายนั้นเกินกำหนดได้ดี
- การกรองโฟลเดอร์ที่ปรากฏในกล่องโต้ตอบเรียกดูสำหรับโฟลเดอร์
- การเปิดกล่องโต้ตอบเบราว์เซอร์โฟลเดอร์คลาสสิกพร้อมโฟลเดอร์เฉพาะที่เลือกไว้ล่วงหน้า
- ทำไมกล่องโต้ตอบบันทึกไฟล์ทั่วไปจึงสร้างไฟล์ชั่วคราวแล้วลบออก
- ปรับแต่งกล่องโต้ตอบแบบเครื่องเก็บสีมาตรฐาน
- ฉันจะตั้งค่าไดเรกทอรีเริ่มต้นของกล่องโต้ตอบเปิดไฟล์เป็นไดเรกทอรีเสมือนได้อย่างไร
- เมื่อฉันเลือกหลายไฟล์ในกล่องโต้ตอบเปิดไฟล์ทำไมรายการสุดท้ายถึงมาก่อน?
- ฉันตั้งค่าตัวเลือก
OFN_NONETWORKBUTTON
ในโครงสร้าง OPENFILENAME
แต่ไม่มีผลต่อรายการเครือข่ายในบานหน้าต่างการนำทาง - ฉันจะเพิ่มการควบคุมที่กำหนดเองลงในไฟล์ทั่วไปที่เปิดหรือบันทึกไฟล์ได้อย่างไร
- ฉันจะให้
FileSavePicker
ของฉันเปิดในโฟลเดอร์เดียวกันกับที่เลือกโดย FileOpenPicker
หรือ FolderPicker
ได้อย่างไร (Win32/com เทียบเท่าที่กล่าวถึงในตอนท้ายของโพสต์)
ระบบควบคุม
- การใช้คีย์
TAB
เพื่อนำทางใน non-dialogs - การใช้คีย์
TAB
เพื่อนำทางใน non-dialogs, redux - การจัดการสถานะ UI ของตัวเร่งความเร็วและโฟกัสสี่เหลี่ยม
- การนำทางที่กำหนดเองในกล่องโต้ตอบ Redux
- กล่องโต้ตอบส่งคืนโฟกัสไปยังตัวควบคุมที่มีโฟกัสเมื่อคุณเปลี่ยนไปครั้งสุดท้าย ฉันจะเข้าสู่การกระทำนั้นสำหรับหน้าต่างของฉันเองได้อย่างไร?
- ฉันจะสร้างลำดับแท็บที่ไม่ใช่วงกลมหรือการสั่งซื้อแบบกำหนดเองประเภทอื่นในกล่องโต้ตอบ Win32 ของฉันได้อย่างไร
ผู้จัดการกล่องโต้ตอบ
- ผู้จัดการกล่องโต้ตอบตอนที่ 1: การอุ่นเครื่อง
- ตัวจัดการโต้ตอบส่วนที่ 2: การสร้างหน้าต่างเฟรม
- ตัวจัดการกล่องโต้ตอบตอนที่ 3: การสร้างตัวควบคุม
- ตัวจัดการกล่องโต้ตอบตอนที่ 4: วงจรกล่องโต้ตอบ
- ตัวจัดการโต้ตอบส่วนที่ 5: การแปลงกล่องโต้ตอบที่ไม่ใช่โมดอลเป็นโมดอล
- ตัวจัดการกล่องโต้ตอบตอนที่ 6: รายละเอียดย่อยในลูปข้อความ
- ตัวจัดการกล่องโต้ตอบตอนที่ 7: รายละเอียดย่อยเพิ่มเติมในลูปข้อความ
- ตัวจัดการโต้ตอบตอนที่ 8: การนำทางที่กำหนดเองในกล่องโต้ตอบ
- ตัวจัดการกล่องโต้ตอบตอนที่ 9: ตัวเร่งความเร็วแบบกำหนดเองในกล่องโต้ตอบ
รูปแบบ
- ลำดับที่ถูกต้องสำหรับการปิดการใช้งานและเปิดใช้งาน Windows
- Modality, ส่วนที่ 1: UI-modality vs code-modality
- Modality, ส่วนที่ 2: รหัส modality vs ui-modality
- Modality, ส่วนที่ 3: ข้อความ
WM_QUIT
- Modality, ส่วนที่ 4: ความสำคัญของการตั้งค่าเจ้าของที่ถูกต้องสำหรับ Modal UI
- Modality, ส่วนที่ 5: การตั้งค่าเจ้าของที่ถูกต้องสำหรับ modal ui
- Modality, ตอนที่ 6: การโต้ตอบกับโปรแกรมที่ได้ไป Modal
- Modality, ตอนที่ 7:
MessageBox
ที่หมดเวลา, เวอร์ชันราคาถูก - Modality, ตอนที่ 8:
MessageBox
ที่หมดเวลารุ่นที่ดีกว่า - Modality, ส่วนที่ 9: การตั้งค่าเจ้าของที่ถูกต้องสำหรับ UI modal, การสอบภาคปฏิบัติ
- ข้อความด้ายถูกกินโดยลูปโมดอล
- การช่วยเหลือข้อความเธรดจาก Modal Loops ผ่านตัวกรองข้อความ
แผ่นทรัพย์สิน
-
DS_SHELLFONT
มีผลกระทบอะไรบ้างในหน้าแผ่นงาน -
PSM_ISDIALOGMESSAGE
เป็นแผ่นคุณสมบัติที่ไม่ได้ IsDialogMessage
- คุณสามารถขยายโครงสร้าง
PROPSHEETPAGE
ด้วยข้อมูลโบนัสของคุณเอง - การแจ้งเตือน
PSN_SETACTIVE
จะถูกส่งทุกครั้งที่หน้าตัวช่วยสร้างของคุณเปิดใช้งาน - การเพิ่มเพย์โหลดเพิ่มเติมกับโครงสร้าง
PROPSHEETPAGE
- ฉันจะส่งผ่านอาร์เรย์ของโครงสร้าง
PROPSHEETPAGE
ขนาดตัวแปรไปยัง PropertySheet ได้อย่างไร
การควบคุม
- เพียงเพราะคุณเป็นตัวควบคุมไม่ได้หมายความว่าคุณจำเป็นต้องอยู่ในกล่องโต้ตอบ
การควบคุมภาพเคลื่อนไหว
- ข้อ จำกัด ของการควบคุมแอนิเมชั่นเชลล์
- เหตุใดการควบคุมภาพเคลื่อนไหวเวอร์ชัน 6 จึงไม่ใช้เธรดพื้นหลัง?
ปุ่ม
- สไตล์ปุ่ม
BS_PUSHLIKE
คืออะไร? (อย่าใช้มันล้าสมัยอย่างสมบูรณ์ในปัจจุบันใช้กล่องกาเครื่องหมายหรือปุ่มตัวเลือกแทน)
กล่องคอมโบ
- เร่งเพิ่มการเพิ่มรายการลงใน combobox หรือ listbox (
WM_SETREDRAW
)
แก้ไขการควบคุม
- ข้อตกลงกับข้อความ
EM_SETHILITE
คืออะไร? - ป้องกันการแก้ไขข้อความควบคุมจากการถูกเลือกอัตโนมัติในกล่องโต้ตอบ
- ฉันจะระงับคำเตือน
CapsLock
เกี่ยวกับการควบคุมการแก้ไขรหัสผ่านได้อย่างไร - ประวัติแรกของรูปแบบการควบคุมการแก้ไข
ES_NUMBER
- ฉันจะอนุญาตให้ตัวเลขติดลบกับรูปแบบการควบคุมการแก้ไข
ES_NUMBER
ได้อย่างไร - ฉันจะอนุญาตให้มีการป้อนเครื่องหมายลบลงในการควบคุมการแก้ไขของฉันได้อย่างไร แต่ถ้ามันเป็นตัวละครตัวแรก?
รายการมุมมอง
- มุมมอง ListView ที่ไม่ได้วางตำแหน่งกับตำแหน่ง
- การแสดง Infotips สำหรับรายการ listview ที่พับและคลี่คลาย
- การคำนวณ infotips listview ในพื้นหลัง
- ความแตกต่างระหว่าง
LVM_HITTEST
และ LVM_INSERTMARKHITTEST
คืออะไร? - เหตุใดจึงมีการแจ้งเตือน
LVN_ODSTATECHANGED
เมื่อมีการแจ้งเตือน LVN_ITEMCHANGED
ที่ดีอยู่แล้ว? - การสร้าง ListView พร้อมช่องทำเครื่องหมายในบางรายการ แต่ไม่ใช่รายการอื่น ๆ
- ฉันจะปรับขนาดคอลัมน์ ListView โดยทางโปรแกรมให้พอดีกับเนื้อหาได้อย่างไร
- ฉันจะสร้างช่องทำเครื่องหมายปิดใช้งานสำหรับรายการ ListView ได้อย่างไร
- เร่งเพิ่มการเพิ่มรายการลงใน combobox หรือ listbox (
WM_SETREDRAW
)
การควบคุมข้อความที่อุดมไปด้วย
ประวัติความเป็นมาของการควบคุม Richedit จาก Murray Sargent (โพสต์เป็นเพียงลิงก์ (เสีย) ไปที่ https://blogs.msdn.microsoft.com/murrays/2006/10/19/some-richedit-history/)- ฉันจะโหลดไฟล์ทั้งหมดลงในการควบคุมข้อความที่เข้มข้นได้อย่างไร
- ฉันจะใส่อักขระได้มากกว่า 32,000 ตัวลงในการควบคุมข้อความที่หลากหลายได้อย่างไร
- ฉันจะพิมพ์เนื้อหาของการควบคุมข้อความที่หลากหลายได้อย่างไร
แถบเลื่อน
- โปรแกรมรอยขีดข่วน
- แถบเลื่อนส่วนที่ 2
- แถบเลื่อนส่วนที่ 3: เพิ่มประสิทธิภาพรอบการทาสี
- แถบเลื่อนส่วนที่ 4: เพิ่มแถบเลื่อนสัดส่วน
- ส่วนที่ 5: การเข้าถึงแป้นพิมพ์สำหรับแถบเลื่อน
- ภาคผนวกถึงส่วนที่ 5: ความละเอียดอ่อนในรหัสแป้นพิมพ์
- แถบเลื่อนตอนที่ 6 - ล้อ
- Scrollbars ตอนที่ 7 - Integrality
- Scrollbars ตอนที่ 8 - การปรับขนาดอินเทอร์แอคทีฟแบบอินเทอร์แอคทีฟ
- Scrollbars ตอนที่ 9 - รักษาคำอุปมาอุปมัย
- Scrollbars ตอนที่ 10 - สู่ความเข้าใจที่ลึกซึ้งยิ่งขึ้นของข้อความ
WM_NCCALCSIZE
- Scrollbars ตอนที่ 11: สู่ความเข้าใจที่ลึกซึ้งยิ่งขึ้นของข้อความ
WM_NCCALCSIZE
- คำตอบสำหรับการออกกำลังกายจาก Scrollbars ตอนที่ 11
- แถบเลื่อนส่วนที่ 12: การใช้
WM_NCCALCSIZE
กับตัวอย่าง Scrollbar ของเรา - Scrollbars Redux: ตอนที่ 12
- แถบเลื่อนมีสองประเภท
- เหตุใด
WHEEL_DELTA
จึงถูกเลือกให้เป็น 120 แทนที่จะเป็นมูลค่าที่สะดวกกว่าเช่น 100 หรือ 10? - เหตุใดการตั้งค่าช่วงแถบเลื่อนแนวนอนเป็นครั้งแรกจึงตั้งค่าช่วงแนวตั้งและในทางกลับกัน?
- AutoScrolling on Drag, ส่วนที่ 1: การใช้งานพื้นฐาน
- AutoScrolling เมื่อลากส่วนที่ 2: ทำไมการเลื่อนไปเร็วกว่านี้ถ้าฉันกระดิกเมาส์?
- AutoScrolling เมื่อลากส่วนที่ 3: Dynamic Autoscroll ขึ้นอยู่กับตำแหน่งเมาส์
- AutoScrolling บน Drag, ส่วนที่ 4: Dynamic Autoscroll ตามความเร็วในการหลบหนี
- AutoScrolling เมื่อลากส่วนที่ 5: การเพิ่ม Wiggle-to-croll เพื่อหลบหนีความเร็ว
การควบคุมแบบคงที่
- เมื่อใดที่การควบคุมแบบคงที่จะลบภาพที่โหลดลงไปโดยอัตโนมัติและเมื่อใดจะเป็นความรับผิดชอบของแอปพลิเคชัน
การควบคุมแท็บ
- ฉันจะสร้างตัวควบคุมในกล่องโต้ตอบที่มีการควบคุมแท็บได้อย่างไร
- ฉันควรจะสร้างลูกของการควบคุมแท็บ Win32 ได้อย่างไร?
แถบเครื่องมือ
- เหตุใดจึงมีทั้ง
TBSTYLE_EX_VERTICAL
และ CCS_VERT
? - ฉันจะสร้างแถบเครื่องมือที่อยู่ในแถบงานได้อย่างไร
- ฉันจะสร้างปุ่มแถบเครื่องมือที่เหมาะสมได้อย่างไร
- การสร้างงานที่กำหนดเองในรายการกระโดด
คำแนะนำเครื่องมือ
- การเข้ารหัสคำแนะนำเครื่องมือในสถานที่
- การใช้การวาดแบบกำหนดเองในคำแนะนำเครื่องมือเพื่อปรับฟอนต์
- มัลติเพล็กซ์เครื่องมือหลายอย่างเป็นหนึ่งในคำแนะนำเครื่องมือ
- การสร้างข้อความคำแนะนำเครื่องมือแบบไดนามิก
- เหตุใดฉันจึงไม่สามารถแสดงคำแนะนำเครื่องมือสำหรับหน้าต่างปิดใช้งานได้
-
TTM_RELAYEVENT
ที่มีเอกสารมากเกินไปและทำไมจึงส่งผลให้ตัวจับเวลาเป็นระยะเวลาหนึ่งวินาทีทำงานตราบเท่าที่คำแนะนำเครื่องมือสามารถมองเห็นได้
แทร็กบาร์
- การเพิ่มตัวเร่งความเร็ว
Ctrl
+Arrow สำหรับการย้ายแทร็กบาร์โดยเพียงหนึ่งหน่วยส่วนที่ 1: การกระโดดเริ่มต้น - การเพิ่มตัวเร่งความเร็ว
Ctrl
+Arrow สำหรับการย้ายแทร็กบาร์โดยเพียงหนึ่งหน่วยตอนที่ 2: ลองครั้งที่สอง - ฉันจะป้องกันไม่ให้ผู้ใช้ใช้เมาส์เพื่อลากนิ้วโป้งแทร็คไปยังตำแหน่งที่ไม่ได้ทวีคูณของห้าได้อย่างไร ส่วนที่ 1: reframe ปัญหา
- ฉันจะป้องกันไม่ให้ผู้ใช้ใช้เมาส์เพื่อลากนิ้วโป้งแทร็คไปยังตำแหน่งที่ไม่ได้ทวีคูณของห้าได้อย่างไร ตอนที่ 2: การสะบัดตำแหน่งนิ้วหัวแม่มือ
มุมมองรายชื่อต้นไม้
- สไตล์
TVS_CHECKBOXES
นั้นแปลกประหลาดซึ่งเป็นวิธีที่สุภาพในการบอกว่ามันบ้า - ระวังรายการภาพที่รั่วไหลออกมาเมื่อใช้สไตล์
TVS_CHECKBOXES
- การสร้างช่องทำเครื่องหมายมุมมองต้นไม้ด้วยตนเอง: รายการภาพสถานะง่าย ๆ
- การสร้างช่องทำเครื่องหมายมุมมองต้นไม้ด้วยตนเอง: ตอบสนองต่อการคลิก
- การสร้างช่องทำเครื่องหมายมุมมองต้นไม้ด้วยตนเอง: กล่องกาเครื่องหมายที่มีธีม
- กล่องกาเครื่องหมายมุมมองต้นไม้: ประวัติอันเลวทราม
- กล่องกาเครื่องหมายมุมมองต้นไม้: สถานะช่องทำเครื่องหมายขยาย
การประมวลผลข้อความ
- หมายเลขข้อความใดเป็นของใคร?
- วิธีการส่งข้อความต่าง ๆ
- การออกอากาศข้อความที่ผู้ใช้กำหนด
- เธรดจะได้รับข้อความหน้าต่างเมื่อใด
- อะไรคือความแตกต่างระหว่าง
GetKeyState
และ GetAsyncKeyState
? - ข้อความด้ายถูกกินโดยลูปโมดอล
- การช่วยเหลือข้อความเธรดจาก Modal Loops ผ่านตัวกรองข้อความ
- อันตรายของการกรองข้อความหน้าต่าง
- คุณไม่สามารถจำลองอินพุตแป้นพิมพ์ด้วย
PostMessage
- การสูบข้อความขณะรอเป็นระยะเวลาหนึ่ง
- ในการติดตามคิวข้อความ
- ไม่จริงคุณต้องส่งข้อความที่ไม่ได้รับการจัดการทั้งหมดไปยัง
DefWindowProc
- แม้ว่าคุณจะมีรหัสในการจัดการข้อความคุณได้รับอนุญาตให้โทรหา
DefWindowProc
เพราะคุณกำลังทำอยู่แล้ว - อะไรคือ
Get/SetMessageExtraInfo
ที่เคยใช้? - เหตุใด
GetWindowLongPtr
จึงส่งคืนค่าขยะบนหน้าต่าง 64 บิต? -
TrackMouseEvent
ติดตามเหตุการณ์เมาส์ในหน้าต่างของคุณ แต่เฉพาะในกรณีที่เหตุการณ์เป็นของหน้าต่างของคุณ - อย่าลืมรวมคิวข้อความไว้ในลำดับชั้นการล็อคของคุณ
- จะเกิดอะไรขึ้นกับข้อความที่ส่งเมื่อ
SendMessageTimeout
มาถึงการหมดเวลา - ทำไมฉันไม่สามารถ
PostMessage
ข้อความ WM_COPYDATA
ได้ แต่ฉันสามารถ SendMessageTimeout
ด้วยการหมดเวลาขนาดเล็กได้? - แม้ว่าข้อความการใช้เมาส์สีและตัวจับเวลาจะถูกสร้างขึ้นตามความต้องการ แต่ก็ยังเป็นไปได้ที่จะต้องจบลงในคิวของคุณ
- ข้อความที่โพสต์จะถูกประมวลผลก่อนข้อความอินพุตแม้ว่าจะโพสต์ในภายหลัง
- หน้าต่างข้อความแบบใดที่สามารถรับข้อความได้อย่างไร
- หากต้นแบบของ
DispatchMessageA
และ DispatchMessageW
เหมือนกันทำไมทั้งคู่? - ผู้ที่ไม่เข้าใจผู้จัดการกล่องโต้ตอบจะถูกนำมาใช้ใหม่อีกครั้ง
- ฉันจะเรียกเคอร์เซอร์เมาส์ซ้ำได้อย่างไรหลังจากที่ฉันเปลี่ยนสถานะแอปพลิเคชันภายในของฉันได้อย่างไร
- ฉันจะกระตุ้นเคอร์เซอร์เมาส์ได้อย่างไรหลังจากที่ฉันเปลี่ยนสถานะแอปพลิเคชันภายในของฉันได้อย่างไร
-
GetQueueStatus
และสถานะคิว
การติดยาเสพติด
- What is the
HINSTANCE
passed to SetWindowsHookEx
used for? - How can I get notified when the cursor changes?
- What does the thread parameter to
SetWindowsHookEx
actually mean? - Why does
SetFocus
fail without telling me why?
Specific Messages
การแจ้งเตือน
- What's the difference between the
wParam
of the WM_NOTIFY
message and the idFrom
in the NMHDR
structure. - Restating the obvious about the
WM_COMMAND
message - Restating the obvious about the
WM_NOTIFY
message
Window Construction and Destruction
- What is the difference between
WM_DESTROY
and WM_NCDESTROY
? - How can I determine the reason why my window is closing? (
WM_CLOSE
)
Window Geometry Messages
- Use
WM_WINDOWPOSCHANGED
to react to window state changes - Use
WM_WINDOWPOSCHANGING
to intercept window state changes
Window Painting Messages
- Paint messages will come in as fast as you let them (
WM_PAINT
) - What happens if I don't paint when I get a
WM_PAINT
message? - What is the implementation of
WM_PRINTCLIENT
? - There's a default implementation for
WM_SETREDRAW
, but you might be able to do better - Speeding up adding items to a combobox or listbox (
WM_SETREDRAW
) - Using
WM_SETREDRAW
to speed up adding a lot of elements to a control
Window Focus Messages
-
WM_KILLFOCUS
is the wrong time to do field validation - The dangers of playing focus games when handling a
WM_KILLFOCUS
message - Why doesn't the
MoveWindow
function generate the WM_GETMINMAXINFO
message?
Keyboard Messages
- How do I respond to the
WM_MENUCHAR
message?
Mouse Messages
- Why is there no
WM_MOUSEENTER
message? - Why do I get spurious
WM_MOUSEMOVE
messages? - Sure, I can get spurious
WM_MOUSEMOVE
messages, but why do they keep streaming in? - How do I get mouse messages faster than
WM_MOUSEMOVE
? - Logical consequences of the way Windows converts single-clicks into double-clicks
- Implementing higher-order clicks
- How slow do you have to slow-double-click for it to be a rename?
- How can I prevent the mouse from moving in response to touch input?
Dialog Messages
- Those who do not understand the dialog manager are doomed to reimplement it, badly
- Managing the UI state of accelerators and focus rectangles (
WM_CHANGEUISTATE
, WM_QUERYUISTATE
and WM_UPDATEUISTATE
) - Untangling the confusingly-named
WM_UPDATEUISTATE
and WM_CHANGEUISTATE
messages - Who sends the initial
WM_UPDATEUISTATE
message? - How can I prevent the keyboard focus rectangle from appearing on a control I created?
- Other tricks with
WM_GETDLGCODE
- How do I prevent multi-line edit controls from eating the Enter key?
- Why do
DLGC_WANTALLKEYS
and DLGC_WANTMESSAGE
have the same value?
Other Window Messages
- The dangers of messing with activation when handling a
WM_ACTIVATE
message - Why does my window get a
WM_ACTIVATE
message when it isn't active? - A timed context menu (
WM_CANCELMODE
) - Pitfalls in handling the
WM_CONTEXTMENU
message ( WM_CONTEXTMENU
) -
WM_NCHITTEST
is for hit-testing, and hit-testing can happen for reasons other than the mouse being over your window - How likely is it that a window will receive a
WM_NULL
message out of the blue? ( WM_NULL
) - Why is there a special
PostQuitMessage
function? ( WM_QUIT
) - How does
PostQuitMessage
know which thread to post the quit message to? ( WM_QUIT
) - Who is responsible for destroying the font passed in the
WM_SETFONT
message? ( WM_SETFONT
) - When I send a
WM_GETFONT
message to a window, why don't I get a font? ( WM_GETFONT
) - If my
WM_TIMER
handler takes longer than the timer period, will my queue fill up with WM_TIMER
messages? - Killing a window timer prevents the
WM_TIMER
message from being generated for that timer, but it doesn't retroactively remove ones that were already generated
System Messages
- If one program blocks shutdown, then all programs block shutdown (
WM_QUERYENDSESSION
, WM_ENDSESSION
) - Why do I have to return this goofy value for
WM_DEVICECHANGE
? ( WM_DEVICECHANGE
) - Windows doesn't close windows when a user logs off; that's your call (
WM_ENDSESSION
) - Once you return from the
WM_ENDSESSION
message, your process can be terminated at any time ( WM_ENDSESSION
)
GDI
- Why are
RECT
s endpoint-exclusive? - Can you create an information context for the display?
- What does the
CS_OWNDC
class style do? - What does the
CS_CLASSDC
class style do? - How do you detect "Large Fonts"? (DPI)
- Drawing a monochrome bitmap with transparency
- Let GDI do your RLE compression for you
- The mysterious stock bitmap: There's no way to summon it, but it shows up in various places
- Why is my icon being drawn at the wrong size when I call
DrawIcon
? - You must flush GDI operations when switching between direct access and GDI access, and direct access includes other parts of GDI
- How do I get the dimensions of a cursor or icon?
- What are the dire consequences of not selecting objects out of my DC?
- Of what use is the
RDW_INTERNALPAINT
flag? - Functions that return GDI regions rarely actually return regions
- Color-aware ClearType requires access to fixed background pixels, which is a problem if you don't know what the background pixels are, or if they aren't fixed
- What is the correct way of using
SaveDC
and RestoreDC
? - How are
BitBlt
raster opcodes calculated? - Notes on
DrawText
and tab stops - Why doesn't
GetTextExtentPoint
return the correct extent for strings containing tabs? - Why are there trivial functions like
CopyRect
and EqualRect
? - More on trivial functions like
CopyRect
and EqualRect
- What are the consequences of increasing the per-process GDI handle limit?
- The focus rectangle says, “I'm not orange. I'm just drawn that way.”
Cursors
- The effect of
SetCursor
lasts only until the next SetCursor
- What can or should I do with the cursor handle returned by
SetCursor
? - What is the deal with the
SM_CXCURSOR
system metric? - How do I find out the size of the mouse cursor?
Brushes
- The hollow brush
- Other uses for bitmap brushes
- What is the DC brush good for?
- I know I can change the color of the DC pen, but what about the other attributes?
- How can I extract the color from a solid color GDI brush?
Pens
- Is there a difference between creating a null pen with
CreatePen
and just using the stock null pen?
Bitmaps
- How do I set the alpha channel of a GDI bitmap to 255?
DIB
- A survey of the various ways of creating GDI bitmaps with predefined data
- Blitting between color and monochrome DCs
- Manipulating the DIB color table for fun and profit
- Using DIB sections to perform bulk color mapping
- The fun and profit of manipulating the DIB color table can be done without having to modify it
- Separating the metadata from the DIB pixels: Precalculating the
BITMAPINFO
- Separating the metadata from the DIB pixels: Changing the raster operation
- The disembodiment of DIBs from the DIB section
- What is the
hSection
parameter to CreateDIBSection
for?
LockWindowUpdate()
- What does
LockWindowUpdate
do? - How is
LockWindowUpdate
meant to be used? - With what operations is
LockWindowUpdate
meant to be used? - With what operations is
LockWindowUpdate
not meant to be used? - Final remarks on
LockWindowUpdate
Painting Standard Elements
- Rendering standard Windows elements
- Rendering menu glyphs is slightly trickier
- What states are possible in a
DRAWITEMSTRUCT
structure?
UXTHEME.DLL
-
BeginBufferedPaint
: It's not just for buffered painting any more - How do
IsThemeActive
, IsAppThemed
, and IsCompositionActive
differ? - How do I get the tabbed dialog effect on my own custom tabbed dialog?
- How do I revert a control back to its default theme?
Multiple Monitors
- For better performance, set all your monitors to the same color format
- How do I get a handle to the primary monitor?
- Why does the primary monitor have
(0,0)
as its upper left coordinate? - How do I get the color depth of the screen?
- How does the window manager adjust
ptMaxSize
and ptMaxPosition
for multiple monitors?
การเข้าถึงได้
- Accessibility is not just for people with disabilities
- How to retrieve text under the cursor (mouse pointer)
- How do I set an accessible name on an unlabeled control?
- How can I get notified when some other window is destroyed?
- Using accessibility to monitor windows as they come and go
- How can I write a program that monitors another window for a title change?
- How can I write a program that monitors another window for a change in size or position?
com
Declaring COM Interfaces
- The macros for declaring COM interfaces, revisited: C version
- The macros for declaring COM interfaces, revisited: C++ version
- The macros for declaring COM interfaces, revisited: C++ implementation
- The oracle always tells the truth, even when it is wrong: COM method calls with a user-defined type as a return value (on problems of COM interfaces called from C code)
- The COM interface contract rules exist for a reason
- Giving a single object multiple COM identities, part 1
- Giving a single object multiple COM identities, part 2
- Giving a single object multiple COM identities, part 3
- Giving a single object multiple COM identities, part 4
- How do I consume raw COM interfaces from a Windows Runtime metadata file?
COM Apartments
- The dreaded "main" threading model
- A slightly less brief introduction to COM apartments (but it's still brief)
- Yo dawg, I hear you like COM apartments, so I put a COM apartment in your COM apartment so you can COM apartment while you COM apartment
- What kind of apartment is the private apartment I created via
CLSID_ContextSwitcher
? - Setting up private COM contexts to allow yourself to unload cleanly
- How do you get into a context via
IContextCallback::ContextCallback
? - Using contexts to return to a COM apartment later
- What do the output values from
CoGetApartmentType
mean? - User interface code + multi-threaded apartment = death
- Other problems traced to violating COM single-threaded apartment rules in the shell
- What's the point of
APTTYPE_CURRENT
? I mean, of course I'm current. - How do I get a foothold in the neutral apartment?
- What is so special about the Application STA?
- What does it mean when a call fails with
0x8000001F = RO_E_BLOCKED_CROSS_ASTA_CALL
?
COM Initialization
- What does the
COINIT_SPEED_OVER_MEMORY
flag to CoInitializeEx
do? - Crashing in COM after I call
CoUninitialize
, how can COM be running after it is uninitalized?
COM Static Store
- The COM static store, part 1: Introduction
- The COM static store, part 2: Race conditions in setting a singleton
- The COM static store, part 3: Avoiding creation of an expensive temporary when setting a singleton
- The COM static store, part 4: Aggregating into a single object
- The COM static store, part 5: Using COM weak references
- The COM static store, part 6: Using C++ weak references
COM Marshaling
- What is COM marshaling and how do I use it?
- On proper handling of buffers in COM and RPC methods
- What are the rules for
CoMarshalInterThreadInterfaceInStream
and CoGetInterfaceAndReleaseStream
? - What are the rules for
CoMarshalInterface
and CoUnmarshalInterface
? -
CoGetInterfaceAndReleaseStream
does not mix with smart pointers - The COM marshaller uses the COM task allocator to allocate and free memory
- Why do I get a
QueryInterface(IID_IMarshal)
and then nothing? - We batched up our COM requests and return a single stream of results, but the performance is still slow
- What are the various usage patterns for manually-marshaled interfaces?
- An initial look at the mechanics of how COM marshaling is performed
- https://devblogs.microsoft.com/oldnewthing/20220616-00/?p=106757
- Writing a marshal-by-value marshaler, part 1
- Writing a marshal-by-value marshaler, part 2
- Writing a compound marshaler
- Understanding the marshaling flags: The free-threaded marshaler
COM Error Handling
- What happens to my COM server-side object when clients die unexpectedly?
- Why does COM require output pointers to be initialized even on failure?
- How do I convert an
HRESULT
to a Win32 error code? - How can I tell the WIL
RETURN_IF_FAILED
macro that some errors are ignorable? - Do not overload the
E_NOINTERFACE
error - What does it mean when a call fails with
0x8000001F = RO_E_BLOCKED_CROSS_ASTA_CALL
? - What does it mean when my cross-thread COM call fails with
RPC_E_SYS_CALL_FAILED
? - Understanding a mysterious
RPC_E_WRONGTHREAD
exception when we're on the right thread
COM Asynchronous Interfaces
- COM asynchronous interfaces, part 1: The basic pattern
- COM asynchronous interfaces, part 2: Abandoning the operation
- COM asynchronous interfaces, part 3: Abandoning the operation after a timeout
- COM asynchronous interfaces, part 4: Doing work while waiting for the asynchronous operation
- COM asynchronous interfaces, part 5: The unreliable server
- COM asynchronous interfaces, part 6: Learning about completion without polling
- COM asynchronous interfaces, part 7: Being called directly when the operation completes
- COM asynchronous interfaces, part 8: Asynchronous release, the problems
- COM asynchronous interfaces, part 9: Asynchronous release, assembling a solution
GUIDs
- What's the difference between
UuidFromString
, IIDFromString
, CLSIDFromString
, GUIDFromString
... - What is the difference between
UuidToString
, StringFromCLSID
, StringFromIID
, and StringFromGUID2
? - Why are there four functions for parsing strings into GUIDs, and why are they in three different DLLs?
- Why does COM express GUIDs in a mix of big-endian and little-endian? Why can't it just pick a side and stick with it?
COM Strings
- Why is there a
BSTR
cache anyway? - Raymond's complete guide to
HSTRING
semantics - What is the correct way of using the string buffer returned by the
WindowsPreallocateStringBuffer
function?
COM Variants
- What's the difference between
VARIANT
and VARIANTARG
? - Nasty gotcha:
VarCmp
vs VariantCompare
- Why can't
VarDateFromStr
parse back a Hungarian date that was generated by VarBstrFromDate
?
IUnknown
- The layout of a COM object
- Under what conditions will the
IUnknown::AddRef
method return 0? - The ways people mess up
IUnknown::QueryInterface
- The ways people mess up
IUnknown::QueryInterface
, episode 2 - The ways people mess up
IUnknown::QueryInterface
, episode 3 - The ways people mess up
IUnknown::QueryInterface
, episode 4 - COM object destructors are very sensitive functions
- Avoiding double-destruction when an object is released
- I'd like an
IUnknown
, I know you have many, I'll take any of them - A very brief introduction to patterns for implementing a COM object that hands out references to itself
- Giving a single object multiple COM identities, part 1
- Giving a single object multiple COM identities, part 2
- Giving a single object multiple COM identities, part 3
- Giving a single object multiple COM identities, part 4
- Reducing chattiness by querying for multiple interfaces at once, part 1
- Reducing chattiness by querying for multiple interfaces at once, part 2
IMoniker
- Pidls and monikers do roughly the same thing, just backwards
ICallback
- A very brief introduction to patterns for implementing a COM object that hands out references to itself
IContextMenu
- Why an object cannot be its own enumerator
- How to host an
IContextMenu
, part 1 - Initial foray - How to host an
IContextMenu
, part 2 - Displaying the context menu - How to host an
IContextMenu
, part 3 - Invocation location - How to host an
IContextMenu
, part 4 - Key context - How to host an
IContextMenu
, part 5 - Handling menu messages - How to host an
IContextMenu
, part 6 - Displaying menu help - How to host an
IContextMenu
, part 7 - Invoking the default verb - How to host an
IContextMenu
, part 8 - Optimizing for the default command - How to host an
IContextMenu
, part 9 - Adding custom commands - How to host an
IContextMenu
, part 10 - Composite extensions - groundwork - How to host an
IContextMenu
, part 11 - Composite extensions - composition - Simplifying context menu extensions with
IExecuteCommand
- How do I launch a file as if it were a text file, even though its extension is not
.txt
? - Do not access the disk in your
IContextMenu
handler, no really, don't do it - Sure, we do that: Context menu edition
- Psychic debugging: Why your
IContextMenu::InvokeCommand
doesn't get called even though you returned success from IContextMenu::QueryContextMenu
- Don't forget to implement canonical names for verbs in your shell context menu extension
IFileDialog
- The
SetClientGuid
method of the common file and folder dialogs lets you give names to those dialogs, too (multiple contexts for open/save dialogs) - How can I get my
FileSavePicker
to open in the same folder that was picked by the FileOpenPicker
or FolderPicker
? (win32/COM equivalent mentioned at the end of the post) - Why does IFileDialog still show non-filesystem folders when I pass
FOS_FORCEFILESYSTEM
?
IMultiLanguage
- Converting between
LCID
s and RFC 1766 language codes - Feel free to stop using
IMultiLanguage2::DetectInputCodepage
INamespaceWalk
- How can I control which parts of the shell namespace the
INamespaceWalk::Walk
operation will walk into? - How can I cancel the
INamespaceWalk::Walk
operation? - Cancelling the
INamespaceWalk::Walk
operation a little faster
IStream
- The subtleties of
CreateStreamOnHGlobal
, part 1: Introduction and basic usage - The subtleties of
CreateStreamOnHGlobal
, part 2: Suppressing the deletion of an unknown HGLOBAL
- The subtleties of
CreateStreamOnHGlobal
, part 3: Suppressing the deletion of a shared HGLOBAL
- The subtleties of
CreateStreamOnHGlobal
, part 4: Non-movable memory - A practical use for
GetHGlobalFromStream
when sharing was never your intention
IVirtualDesktopManager
- Virtual desktops are an end-user window management feature, not a programmatic one
Clipboard
- How ownership of the Windows clipboard is tracked in Win32
- What happens when applications try to copy text by sending
Ctrl+C
- How do I make it so that users can copy static text on a dialog box to the clipboard easily?
- What is the proper handling of
WM_RENDERFORMAT
and WM_RENDERALLFORMATS
? - Copying a file to the clipboard so you can paste it into Explorer or an email message or whatever
- Printing the contents of the clipboard as text to
stdout
- Improving the performance of
CF_HDROP
by providing file attribute information - What's up with the
CF_SYLK
and CF_DIF
clipboard formats? - How can I wait more than 30 seconds for a delay-rendered clipboard format to become rendered?
Drag and Drop
- What a drag: Dragging text
- What a drag: Dragging a Uniform Resource Locator (URL)
- What a drag: Dragging a Uniform Resource Locator (URL) and text
- What a drag: Dragging a virtual file (
HGLOBAL
edition) - What a drag: Dragging a virtual file (
IStream
edition) - What a drag: Dragging a virtual file (
IStorage
edition) - You can drag multiple virtual objects, you know
- Reading a contract from the other side: Simulating a drop
- Simulating a drop, part two
- What happens if I drag the mouse by exactly the amount specified by
SM_CXDRAG
? - How do I accept files to be opened via
IDropTarget
instead of on the command line? - How do I accept files to be opened via
IDropTarget
instead of on the command line? - bonus content - Using Explorer's fancy drag/drop effects in your own programs
- Drag/drop effects: The little drop information box
- Why isn't my shell namespace extension getting every single
DragOver
mouse message? - Why doesn't my program get fancy drag/drop effects in high contrast mode with
CLSID_DragDropHelper
?
Enumeration
- Using fibers to simplify enumerators, part 1: When life is easier for the enumerator
- Using fibers to simplify enumerators, part 2: When life is easier for the caller
- Using fibers to simplify enumerators, part 3: Having it both ways
- Using fibers to simplify enumerators, part 4: Filtering
- Using fibers to simplify enumerators, part 5: Composition
เปลือก
- When does
SHLoadInProc
unload a DLL? - What does
SHGFI_USEFILEATTRIBUTES
mean? - What's the difference between
SHGetMalloc
, SHAlloc
, CoGetMalloc
, and CoTaskMemAlloc
- Querying information from an Explorer window
- Execute a file as if it were a program, even though its extension is not
EXE
- How do I launch a file as if it were a text file, even though its extension is not
.txt
? - What does the
SEE_MASK_UNICODE
flag in ShellExecuteEx
actually do? - Simple things you can do with the
ShellExecuteEx
function - What were
ShellExecute
hooks designed for? - Why does
ShellExecute
return SE_ERR_ACCESSDENIED
for nearly everything? - How do I
ShellExecute
a file, but with a specific program instead of the default program? - What is the difference between
CSIDL_DESKTOP
and CSIDL_DESKTOPDIRECTORY
? -
SHCIDS_CANONICALONLY
is the moral equivalent in the shell namespace of the Unicode ordinal comparison - Don't forget to double-null-terminate those strings you pass to
SHFileOperation
- Why does
SHFileOperation
have internal error codes for DVD? - Why do non-folders in my shell namespace extension show up in the folder tree view?
-
SHAutoComplete
giveth, and SHAutoComplete
taketh away - What is the
lpClass
member of SHELLEXECUTEINFO
used for? - Some known folders cannot be moved, but others can, and you'll just have to accept that
- One possible reason why
ShellExecute
returns SE_ERR_ACCESSDENIED
and ShellExecuteEx
returns ERROR_ACCESS_DENIED
- Why does
SHGetSpecialFolderPath
take such a long time before returning a network error? - How do you obtain the icon for a shortcut without the shortcut overlay? (
SHGetFileInfo()
) - How can I get information about the items in the Recycle Bin?
- Modernizing our simple program that retrieves information about the items in the Recycle Bin
- Invoking commands on items in the Recycle Bin
- How do I perform shell file operations while avoiding shell copy hooks?
- Command line tool to manage Windows 7 Libraries, with source code (
IShellLibrary
) -
IShellFolder::BindToObject
is a high-traffic method; don't do any heavy lifting - Obtaining the parsing name (and pidl) for a random shell object
- Creating a simple pidl: For the times you care enough to send the very fake
- Creating a simple shell item, just as fake as a simple pidl
- Displaying a property sheet for multiple files
- How do I get a high resolution icon for a file?
- How do I extract an icon at a nonstandard size if
IExtractIcon::Extract
tells me to go jump in a lake? - How do I read the "Double-click to open an item (single-click to select)" setting in Folder Options?
- The wonderful world of shell bind context strings
- Helper functions to make shell bind contexts slightly more manageable
- Customizing item enumeration with
IShellItem
- Customizing item enumeration with
IShellItem
, the old-fashioned way - How do I create an
IShellItemArray
from a bunch of file paths? - How do I invoke a verb on an
IShellItemArray
? - How does a shell namespace extension provide icons for virtual items that track the standard icons set by the user's file associations?
- How do I get the user-customed name of My Computer or Recycle Bin?
- How do I get the user-customized name of a mapped network drive?
- Enumerating all the programs that can open a particular file extension
- Enumerating all the programs that can launch a particular protocol
- How do I register a command on the desktop background context menu? (And how do I remove one I don't like?)
- How can I get the canonical name for a known folder?
- Peeking inside an
IShellItem
to see what it's made of - Why does
SHGetKnownFolderPath
return E_FAIL
for a known folder? - Why does
SHGetKnownFolderPath
fail when impersonating? - Why can't I use
SHSetKnownFolderPath
to change the location of FOLDERID_LocalAppData
? - How do I programmatically add a folder to my Documents library?
- Why doesn't
SHGetFileInfo
give me customized folder icons? - How can I detect that a shell item refers to a virtual folder, or to a file system inside a file?
- Why is there a limit of 15 shell icon overlays?
- The case of the
SHGetFolderPath(CSIDL_COMMON_DOCUMENTS)
that returned ERROR_PATH_NOT_FOUND
- Why is the
HSHELL_WINDOWDESTROYED
notification raised when a window is hidden, even if it hasn't been destroyed? - Why am I receiving
HCNE_UPDATEDIR
notifications that my code never generates? - Why am I receiving
SHCNE_UPDATEDIR
notifications that my code never generates? - How can I get the original target of a shortcut without applying any 32-bit adjustments?
- How does Explorer calculate the “Date” of a file?
Uncategorized COM Stuff
- The macros for declaring and implementing COM interfaces
- An introduction to COM connection points
- Dispatch interfaces as connection point interfaces
- Adjustor thunks
- What is the underlying object behind a COM interface pointer?
- How to turn off the exception handler that COM "helpfully" wraps around your server
- Shortcuts are serializable objects, which means that they can be stored in places other than just a file
- Why does
IFileOperation
skip junctions even though I passed FOFX_NOSKIPJUNCTIONS
? - Nasty gotcha:
STGM_READ | STGM_WRITE
does not grant read/write access - How can I get the list of programs the same way that Programs and Features gets it?
- How do I obtain the computer manufacturer's name via C++? (
IWbemClassObject
) - The stream pointer position in
IDataObject::GetData
and IDataObject::GetDataHere
is significant - The sad implementation history of COM component categories and why it means you have to click twice to see your newly-installed taskbar toolbar
- How do I request that my out-of-process COM server run unelevated?
- How can a desktop app use a Windows Runtime object that infers UI context from its thread? The
IInitializeWithWindow
pattern ( IInitializeWithWindow
) - How do I protect myself against a COM call that can hang? I'm already running the server out-of-process.
- What can I do about timer build-up when waiting for COM outbound calls to complete?
- Manipulating the positions of desktop icons
- A reminder about the correct way of accessing and manipulating the position of icons on the desktop
- The oracle always tells the truth, even when it is wrong: COM method calls with a user-defined type as a return value (on problems of COM interfaces called from C code)
- Notes on COM aggregation: Obtaining a pointer to your aggregated partner without introducing a reference cycle
- Notes on COM aggregation: How do you implement tear-offs in an aggregated object?
- The theory behind the
IHttpFilter
interface
หน่วยความจำ
- Stupid memory-mapping tricks
- Creating a shared memory block that can grow in size
- Why do I have to pass a valid page protection value to
VirtualAlloc
even if it ignores it? - How can I include/exclude specific memory blocks in user-mode crash dumps?
-
IsBadXxxPtr
should really be called CrashProgramRandomly ( IsBadWritePtr()
et al.) - A closer look at the stack guard page
- The case of the stack overflow exception when the stack is nowhere near overflowing
- How to allocate address space with a custom alignment or in a custom address region
Input and Output
- Mount points, volumes, and physical drives, oh my!
- What's the difference between an asynchronous
PIPE_WAIT
pipe and a PIPE_NOWAIT
pipe? - Be careful when redirecting both a process's
stdin
and stdout
to pipes, for you can easily deadlock - Looking at the problem at the wrong level: Closing a process's
stdin
-
ReadDirectoryChangesW
reads directory changes, but what if the directory doesn't change? - How do
FILE_FLAG_SEQUENTIAL_SCAN
and FILE_FLAG_RANDOM_ACCESS
affect how the operating system treats my file? - I used
FILE_FLAG_SEQUENTIAL_SCAN
but it didn't seem to speed up my sequential scanning - You can use an
OVERLAPPED
structure with synchronous I/O, too - We're currently using
FILE_FLAG_NO_BUFFERING
and FILE_FLAG_WRITE_THROUGH
, but we would like our WriteFile
to go even faster - On using
ILE_FLAG_WRITE_THROUGH
and FILE_FLAG_NO_BUFFERING
for memory-mapped files - On the interaction between the
FILE_FLAG_NO_BUFFERING
and FILE_FLAG_WRITE_THROUGH
flags - Why does my synchronous overlapped
ReadFile
return FALSE
when the end of the file is reached? - Why does
SetFileValidData
fail even though I enabled the SE_MANAGE_VOLUME_NAME
privilege? - Is
GENERIC_ALL
equivalent to GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE
? -
CancelIoEx
can cancel I/O on console input, which is kind of nice -
CancelIoEx
can cancel synchronous I/O, which is kind of nice - Why does
IsPathRelative
return FALSE
for paths that are drive-relative? - The security check happens at the acquisition of the handle
- Taking a shortcut: You can query properties from a volume, and it will forward to the physical drive
- https://devblogs.microsoft.com/oldnewthing/20201023-00/?p=104395
- How do I disassociate a thread from an I/O completion port?
- Is it okay to call
MapViewOfFile
on the same mapping handle simultaneously from different threads? - What are these dire multithreading consequences that the
GetFullPathName
documentation is trying to warn me about? - How can I force a
WriteFile
or ReadFile
to complete synchronously or hang, in order to test something? - How can I perform a
CopyFile
, but also flush the file buffers before the destination handle is closed?
Asynchronous Input and Output
- Developing the method for taking advantage of the fact that the
OVERLAPPED
associated with asynchronous I/O is passed by address - Ready... cancel... wait for it! (part 1)
- Ready... cancel... wait for it! (part 2)
- Ready... cancel... wait for it! (part 3)
- If you're waiting for I/O to complete, it helps if you actually have an I/O to begin with
- Why does my asynchronous I/O complete synchronously?
- If an asynchronous I/O completes synchronously, is the
hEvent
in the OVERLAPPED
structure signaled anyway? - You can use an
OVERLAPPED
structure with synchronous I/O, too - Why does my synchronous overlapped
ReadFile
return FALSE
when the end of the file is reached? - If I issue a second overlapped I/O operation without waiting for the first one to complete, are they still guaranteed to complete in order?
- Why are my file write operations synchronous, even though I opened the file as
FILE_FLAG_OVERLAPPED
? - File-extending writes are not always synchronous, which is entirely within the contract
- Why you might need additional control over the secret event hiding inside the file object
- Why doesn't my asynchronous read operation complete when I close the handle?
- The mental model for
StartThreadpoolIo
- How can I force a
WriteFile
or ReadFile
to complete synchronously or hang, in order to test something? - If I issue multiple overlapped I/O requests against the same region of a file, will they execute in the order I issued them?
- What are the potentially-erroneous results if you don't pass
NULL
as the lpNumberOfBytesRead
when issuing overlapped I/O?
Files and Directories
- The Definitive Guide on Win32 to NT Path Conversion
- How can I tell that a directory is really a recycle bin?
- How can I tell that a directory is weird and should be excluded from the user interface?
- How do I get information about the target of a symbolic link?
- How do I access a file without updating its last-access time?
- How do I show the contents of a directory while respecting the user's preferences for hidden and super-hidden files as well as the user's language preferences?
- You can use a file as a synchronization object, too
- How can I append to a file and know where it got written, even if the file is being updated by multiple processes?
- The
FILE_FLAG_DELETE_ON_CLOSE
flag applies to the handle, also known as the file object, which is not the same as the file - How long do I have to keep the
SECURITY_ATTRIBUTES
and SECURITY_DESCRIPTOR
structures valid after using them to create a file? - How do I create a directory where people can create subdirectories but cannot mess with those created by other users?
- How can I tell whether a file is on a removable drive, a fixed drive, or a remote drive?
- How can I tell whether a file is on an SSD?
- Why does a non-recursive
ReadDirectoryChangesW
still report files created inside subdirectories? - The early history of Windows file attributes, and why there is a gap between System and Directory
- Even if you open a file with GUID, you can still get its name, or at least one of its names (
GetFinalPathNameByHandle()
) - How do I get from a file path to the volume that holds it?
- How do I get from a volume to the physical disk that holds it?
- Renaming a file is a multi-step process, only one of which is changing the name of the file
- How can I recognize file systems that don't support 64-bit unique file identifiers?
- How can I recognize whether two handles refer to the same underlying file?
ACL
- The
MoveSecurityAttributes
policy affects only how Explorer recalculates ACLs when a file is moved; everybody else is on their own - How to create a folder that inherits its parent's ACL, and then overrides part of it
Security Permissions, Attributes and Identifiers
- The security check happens at the acquisition of the handle
- What is the default security descriptor?
- How do I convert a SID between binary and string forms?
- What are these SIDs of the form
S-1-15-2-xxx
? - What are these SIDs of the form
S-1-15-3-xxx
? - An easy way to determine whether you have a particular file permission
- What are the access rights and privileges that control changing ownership of an object?
- How do the names in the file security dialog map to access control masks?
- If you ask for
STANDARD_RIGHTS_REQUIRED
, you may as well ask for the moon - A user's SID can change, so make sure to check the SID history
- Detecting whether a SID is well-known SID
- SIDs are really just another a fancy way of creating unique IDs in a decentralized way
- What's the point of giving my unnamed object proper security attributes since unnamed objects aren't accessible outside the process anyway (or are they?)
- Is a SID with zero subauthorities a valid SID? It depends whom you ask
- What's the difference between duplicating the handle to a token and duplicating a token?
- I called
AdjustTokenPrivileges
, but I was still told that a necessary privilege was not held - I called
AdjustTokenPrivileges
, but I was still told that a necessary privilege was not held, redux - The history of the
EncodePointer
function for obfuscating pointers - Additional helpful pseudo-handles: The process token, the thread token, and the effective token
- How can I tell whether my process is running as SYSTEM?
- A brief summary of the various versions of the Security Descriptor Definition Language (SDDL)
- How do I free the pointers returned by functions like
GetTokenInformation
? - A clarification on the multithreading constraints of the
EncryptMessage
function
Registry
- Beware of non-null-terminated registry strings
- The performance cost of reading a registry key
- So how bad is it that I'm calling
RegOpenKey
instead of RegOpenKeyEx
? - If I simply want to create a registry key but don't intend to do anything else with it, what security access mask should I ask for?
- How can I programmatically inspect and manipulate a registry hive file without mounting it?
- Why doesn't
RegSetKeySecurity
propagate inheritable ACEs, but SetSecurityInfo
does? - Why does
RegNotifyChangeKeyValue
stop notifying once the key is deleted? - How can I emulate the
REG_NOTIFY_THREAD_AGNOSTIC
flag on systems that don't support it? part 1 - How can I emulate the
REG_NOTIFY_THREAD_AGNOSTIC
flag on systems that don't support it? part 2 - How can I emulate the
REG_NOTIFY_THREAD_AGNOSTIC
flag on systems that don't support it? part 3 - How can I emulate the
REG_NOTIFY_THREAD_AGNOSTIC
flag on systems that don't support it? part 4 - How can I emulate the
REG_NOTIFY_THREAD_AGNOSTIC
flag on systems that don't support it? part 5 - The history of passing a null pointer as the key name to
RegOpenKeyEx
- On the failed unrealized promise of
RegOverridePredefKey
(ie don't use it.)
Strings and Locales
-
TEXT
vs. _TEXT
vs. _T
, and UNICODE
vs. _UNICODE
- The sad history of Unicode
printf
-style format specifiers in Visual C++ - Nasty gotcha:
SetThreadUILanguage
cannot be used to restore the thread UI language - How can
CharUpper
and CharLower
guarantee that the uppercase version of a string is the same length as the lowercase version? (use LCMapStringEx()
in any new code) - Is there a code page that matches ASCII and can round trip arbitrary bytes through Unicode?
- A consequence of being the first to adopt a standard is that you may end up being the only one to adopt it: The sad story of Korean jamo
- The
activeCodePage
manifest element can be used for more than just setting UTF-8 as the active code page - Feel free to stop using
IMultiLanguage2::DetectInputCodepage
- On the proper care and feeding of the enigmatic
GetDistanceOfClosestLanguageInList
function - How can I get
WideCharToMultiByte
to convert strings encoded in UTF-16BE?
NT Services
- Calling
ShutdownBlockReasonCreate
from my service doesn't stop the user from shutting down - What does it mean when my attempt to stop a Windows NT service fails with
ERROR_BROKEN_PIPE
? - How can I configure my Windows NT service to autostart when the system gains Internet access?
- On the confusing names for the Windows service SID types
Uncategorized
- How do I determine the processor's cache line size? (
GetLogicalProcessorInformation()
) - Why are structure sizes checked strictly?
- What's the difference between
CreateMenu
and CreatePopupMenu
? - Why are
HANDLE
return values so inconsistent? - How to retrieve text under the cursor (mouse pointer)
- How to detect programmatically whether you are running on 64-bit Windows
- A timed context menu
- The importance of passing the
WT_EXECUTELONGFUNCTION
flag to QueueUserWorkItem
- If your callback fails, it's your responsibility to set the error code
- The double-click time tells the window manager how good your reflexes are
- The cursor isn't associated with a window or a window class; it's associated with a thread group
- Menu item states are not reliable until they are shown because they aren't needed until then
- How can I display a live screenshot of a piece of another application?
- Converting from a UTC-based
SYSTEMTIME
directly to a local-time-based SYSTEMTIME
- Programmatically uploading a file to an FTP site
- How can you use both versions 5 and 6 of the common controls within the same module?
- How can I tell if Windows Update is waiting for the system to reboot?
- How do I call
SetTimer
with a timer ID that is guaranteed not to conflict with any other timer ID? - A window can't have two timers with the same ID, so how do I assign an ID that nobody else is using?
- What does it mean when a display change is temporary?
- How do I obtain the comment for a share?
- How accurate are the various Windows time-querying functions?
- How can I detect whether the user is logging off?
- Why are timer IDs and dialog control IDs 64-bit values on 64-bit Windows? Did you really expect people to create more than 4 billion timers or dialog controls?
- If you suppress GDI+ background thread, then you are expected to pump messages yourself
- If one program blocks shutdown, then all programs block shutdown (
WM_QUERYENDSESSION
, WM_ENDSESSION
) - When I ask the
GetIpAddrTable
function to sort the results, how are they sorted? - How can I detect that the system is no longer showing a UAC prompt? (
EVENT_SYSTEM_DESKTOPSWITCH
) - How can I get the number of processors in the system, when there are more than 64?
- Why are some system functions exported as stubs instead as forwarders?
- How can I check whether the user has disconnected from the session?
- Why does
PF_VIRT_FIRMWARE_ENABLED
return false even when virtualization is enabled in the firmware? - How can I convert between IANA time zones and Windows registry-based time zones?
- The focus rectangle says, “I'm not orange. I'm just drawn that way.”
- Why does the precise point at which I get a stack overflow exception change from run to run? (structured exception handling aka SEH)
- How do I programmatically reposition monitors in a multiple-monitor system? (
ChangeDisplaySettingsEx()
) - How do I upgrade a 32-bit tick count to a 64-bit one?
- The error code you get might not be the one you want
- How can I find out which processor architectures are supported via emulation by the current system?
- How can I detect whether the system has a keyboard attached? On the
GetRawInputDeviceList
function - Filtering out fake keyboards from the
GetRawInputDeviceList
function - How expensive is
PssCaptureSnapshot
? How fast is it? How much memory does it consume? - What is the
CreateExplorerShellUnelevatedTask
scheduled task? - Under what conditions can I modify the memory that I received in the form a
STGMEDIUM
? - Is it true that raising a structured exception from a structured exception handler terminates the process?
- Why are many Windows user interface elements positioned at multiples of 4 or 8 pixels? (DPI,
DEVICE_SCALE_FACTOR
) - A history of the
fd_set
, FD_SETSIZE
, and how it relates to WinSock - How can I detect programmatically whether Windows is an N or KN version?
- How should I interpret the various values of
NLM_CONNECTIVITY
? - How can I find out the last time a user logged on from C++?
- How can I specify icons for my app to use on the Start menu in high contrast mode?
- How can I add an environment variable to a process launched via
ShellExecuteEx
or IContextMenu
? - Functions that return the size of a required buffer generally return upper bounds, not tight bounds