Share via


CWindow::GetWindowThreadID

Retrieves the identifier of the thread that created the specified window.

DWORD GetWindowThreadID( ) throw();

Remarks

See GetWindowThreadProcessID in the Windows SDK.

Example

//The following example attaches an HWND to the CWindow object and  
//calls CWindow::GetWindowThreadID() to retrieve the id of the thread  
//that created the window

CWindow myWindow;
myWindow.Attach(hWnd);
DWORD dwID = myWindow.GetWindowThreadID();

Requirements

Header: atlwin.h

See Also

Reference

CWindow Class

CWindow::GetWindowProcessID