How to instance a Frame/View program from a dialog based program?
I wrote a CFrameWnd/CView based program( not a Doc/View based program).
I need to open the former CFrameWnd/CView based program in a dialog program. So I complie my the CFrame/Cview based program as a static lib, and configure the lib dependency and #include file path.
And then, in the dialog program, in a button on click function I, create a new instatnce of CMainFrame to show it.
Here is my code:
CMainFrame* pFrame = new CMainFrame;
pFrame->LoadFrame(IDR_MAINFRAME,
WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL,
NULL);
pFrame->ShowWindow(SW_SHOW);
pFrame->UpdateWindow();
I complied it successfully, but when I click the button, it says that
"Debug Assertion Failed" @ line 23 of afxwin1.inl....
I have no idea about this. Can any one help me? Any suggestion or hints? Thanks!!

