AfxSetResourceHandle(hInstance); CSingleDocTemplate* pDocTemplate; pDocTemplate = new CSingleDocTemplate( IDR_MAINFRAME, RUNTIME_CLASS(CMFCAPPDoc), RUNTIME_CLASS(CMainFrame), // main SDI frame window RUNTIME_CLASS(CMFCAPPView)); CWinApp* app = AfxGetApp(); //no use because app = null why Interface* ip = GetCOREInterface(); CFrameWnd* pMaxFrame = (CFrameWnd*)ip->GetMAXHWnd(); CMFCAPPDoc* pDoc = (CMFCAPPDoc*)pDocTemplate->CreateNewDocument(); CMainFrame* pFrame = (CMainFrame*)pDocTemplate->CreateNewFrame(pDoc, pMaxFrame); pDocTemplate->InitialUpdateFrame(pFrame,pDoc, TRUE);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)