DWORD GetCurrentThreadId(VOID);//获取当前窗口线程ID DWORD GetCurrentProcessId(VOID);//获取当前窗口进程ID
DWORD GetWindowThreadProcessId( HWND hWnd, // handle to window LPDWORD lpdwProcessId // process identifier 窗口句柄为hWnd的窗口进程ID ); 返回值:hWnd窗口的线程ID
转载于:https://blog.51cto.com/whatever957/1598086