DWORD GetWindowThreadID( );
See GetWindowThreadProcessID in the Win32 SDK.
Remarks
Retrieves the identifier of the thread that created the specified window.
CWindow Overview | Class Members
See Also CWindow::GetWindowProcessID