分类: WINDOWS
2007-01-19 16:37:12
//CWnd Object to HWND:
CWnd wnd;
HWND hWnd;
hWnd = wnd.m_hWnd;
// or
hWnd = wnd.GetSafeHwnd(); //推荐
// HWND to CWnd Object:
CWnd *pWnd;
HWND hWnd;
pWnd = CWnd::FromHandle(hWnd);
// or
pWnd->Attach(hWnd);