
Help: CView with MDI vs. SDI
Here is the MDI code in the CMainFrm:
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
.......................
Quote:
}
It's said that the call to CMDIFrameWnd::OnCreate(), through the
message hierarchy and function calling, will call
CFrameWnd::CreateView, which
creates the corresponding CView (VMyView)object. However, it doesn't!
(I traced
into it without going into the CMyView::CMyView(). It's under MDI.
However, another SDI program, such call:
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
......
will directthe process into CMyView::CMyView()!
Please help! How to make the MDI code also do it? Thanks very much!!