获取视图句柄

CMainFrame* main = (CMainFrame*)AfxGetApp()->m_pMainWnd;
CWnd* pPaneShow = main->wndSplitter.GetPane(0,0);//获得CMsmonitorView窗口指针
HWND mhwnd = pPaneShow->m_hWnd;//由指针获得句柄
----------------------------------------------------------------------------
一下实现相同的效果

CMainFrame *pMain=(CMainFrame *)AfxGetApp()->m_pMainWnd;
CMyTreeView *pView=(CMyTreeView*)pMain->GetActiveView();

 

==


CFrameWnd *pWnd =(CFrameWnd*)AfxGetApp()->m_pMainWnd;
CView* ThreadView1=pWnd->GetActiveView();

posted on 2012-02-23 16:36  小水人  阅读(344)  评论(0编辑  收藏  举报