共用方式為


CWindow::DestroyWindow

終結視窗與 CWindow 物件並設定 m_hWndNULL

BOOL DestroyWindow( ) throw();

備註

請參閱在 Windows SDK的 DestroyWindow

它不會終結 CWindow 物件。

範例

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::DestroyWindow() to destroy the window

CWindow myWindow;
myWindow.Attach(hWndChild);
//call the CWindow wrappers

myWindow.DestroyWindow();
hWndChild = NULL;

需求

Header: atlwin.h

請參閱

參考

CWindow 類別