我在我的程序中把主窗口分成了三份,请问如何才能得到其中一个窗口的句柄?
具体如下:
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext*
pContext)
{
m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CMfclookView), CSize
(0,130),
pContext);
m_wndSplitter2.CreateStatic
(&m_wndSplitter,1,2,WS_CHILD|WS_VISIBLE,
m_wndSplitter.IdFromRowCol (1,0));
m_wndSplitter2.CreateView (0,0,RUNTIME_CLASS(CDragView),CSize
(30,0),pContext);
m_wndSplitter2.CreateView (0,1,RUNTIME_CLASS(XListView),CSize
(30,0),pContext);
return (bCreateSpltr);
}
我如何才能得到那个XListView窗口的句柄 ?
用以下语句
CWnd *pWnd = GetPan(0,1);
HWND hWnd = pWnd->GetSafeHwnd()