使用的方法是 HICON  CWnd::GetIcon( BOOL bBigIcon ) const;然后是得到当前处于激活状态的视窗
CMDIFrameWnd *pFrame = 
              ( CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;// Get the active MDI child window.
CMDIChildWnd *pChild = 
             (CMDIChildWnd *) pFrame->GetActiveFrame();// or CMDIChildWnd *pChild = pFrame->MDIGetActive();// Get the active view attached to the active MDI child
// window.
CMyView *pView = (CMyView *) pChild->GetActiveView();HICON  hMyIcon = pView->GetIcon(TRUE);