共用方式為


CWindow::GetWindowProcessID

擷取建立 Windows 處理序的識別項。

DWORD GetWindowProcessID( ) throw();

備註

請參閱在 Windows SDK的 GetWindowThreadProcessID

範例

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

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

需求

Header: atlwin.h

請參閱

參考

CWindow 類別

CWindow::GetWindowThreadID