16,466
社区成员
发帖
与我相关
我的任务
分享
int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1)
return -1;
//m_wndView是CView类
// TODO: Add your specialized creation code here
if (!m_wndView.Create(NULL, NULL, WS_CHILD|WS_VISIBLE,//AFX_WS_DEFAULT_VIEW,
CRect(0, 0, 0, 0), this, AFX_IDW_PANE_FIRST, NULL))
{
TRACE0("Failed to create view window\n");
return -1;
}
....
int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1)
return -1;
CNewView* m_wndView = new CNewView;
// TODO: Add your specialized creation code here
if (!m_wndView->Create(NULL, NULL, WS_CHILD|WS_VISIBLE,//AFX_WS_DEFAULT_VIEW,
CRect(0, 0, 0, 0), this, AFX_IDW_PANE_FIRST, NULL))
{
TRACE0("Failed to create view window\n");
return -1;
}
...
}