一般切分窗口都是在CMainFrame::OnCreateClient()中用CSplitterWnd作的
应为现在做了很多个View,所以不嫩在CMainFrame中切分
我想在View中切分,CView::OnCreate()中作,但是没有成功
请教各位如何做?
应为现在做了很多个View,所以不嫩在CMainFrame中切分
我想在View中切分,CView::OnCreate()中作,但是没有成功
请教各位如何做?
CCreateContext *pContext = (CCreateContext*)lpCreateStruct->lpCreateParams;
if(!m_wndSplitter.CreateStatic(this, 2, 1))
return FALSE; // 创建所有设备显示视图
if(!m_wndSplitter.CreateView(0, 0,
RUNTIME_CLASS(CxxxView), CSize(0, 0), pContext))
{
return FALSE;
}...
在视图中切分窗口和在MainFrame中的一样,不过在MainFrame中CCreateContext *pContext是一个参数不用自己搞,而在视图中你必须自己搞CCreateContext *pContext = (CCreateContext*)lpCreateStruct->lpCreateParams;
假如有个CMainView,我在CMainView中加了tableCtrl作了几个View
然后再某一个View中需要切分窗口,如CTab1View中的OnCreate()
但是没有CSplitterWnd出来