Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
MFC
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

CWnd::GetSafeHwnd

Returns m_hWnd, or NULL if the this pointer is NULL.

HWND GetSafeHwnd( ) const;

Returns the window handle for a window. Returns NULL if the CWnd is not attached to a window or if it is used with a NULL CWnd pointer.

See the example for CWnd::SubclassWindow.

Header: afxwin.h

Community Additions

ADD
Show:
© 2015 Microsoft