rt..
------解决方案--------------------
友情帮顶
------解决方案--------------------
The GetWindowThreadProcessId function retrieves the identifier of the thread that created the specified window and, optionally, the identifier of the process that created the window.
DWORD GetWindowThreadProcessId(
HWND hWnd,
LPDWORD lpdwProcessId );