GetWindowThreadProcessId 函数有两个作用,如果第er个参数为空,则取ThreadID<br>如果第二个参数是ThreadIDID,则取ProcessID<br><br>function GetWindowThreadProcessId(hWnd: HWND; lpdwProcessId: Pointer): DWORD; external user32 name 'GetWindowThreadProcessId'; 这个取<br>function GetWindowThreadProcessId(hWnd: HWND; var dwProcessId: DWORD): DWORD; external user32 name 'GetWindowThreadProcessId';<br><br><br><br>FThreadID := GetWindowThreadProcessId(AOwnerWND, nil);<br>FProcessID := GetWindowThreadProcessId(AOwnerWND, FThreadID);<br><br>给分吧