最近老是看到GetSafeHwnd,MSDN了一下。稍微理解一下。
CWnd::GetSafeHwnd
(这是CWnd的一个成员函数)
HWND GetSafeHwnd()const;
(这是个const 函数)
Return Value
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.
(调用它返回窗口的句柄,如果CWnd没有与任何窗口联系或者用于一直空的CWnd指针,它返回NULL)