Difference between HANDLE and HWND in Windows API?
问题 I'm trying to use function SetForegroundWindow(HWND hWnD) . I have some handles but it's not working as parameter of above function. My handle is a thread and I want to run it in foreground. What are the differences between a HWND and a HANDLE? 回答1: They are just abstract data types. According to MSDN, HANDLE and HWND are defined as: HANDLE is a handle to an object. HWND is a handle to a window. So, a HWND is a HANDLE , but not all HANDLE s are HWND . In fact: typedef void *PVOID; typedef