HWND←→CWndの変換

// HWND→CWnd*
CWnd* pCWnd = CWnd::FromHandle( hwnd );

// CWnd*→HWND
HWND  hwnd  = pCWnd->GetSafeHwnd();

ネタ元