LPDWORD lpdwProcessId );
hWnd [in] Handle to the window.
lpdwProcessId [out] Pointer to a 32-bit value that receives the process identifier.
If this parameter is not NULL, GetWindowThreadProcessId copies the identifier of the process to the 32-bit value; otherwise, it does not.
The return value is the identifier of the thread that created the window.