BOOL CMyWinApp::InitInstance(){ CMyFrameWnd* pFrame = new CMyFrameWnd; m_pMainWnd = pFrame; pFrame->Create(NULL,"MFCSplit"); pFrame->ShowWindow(SW_SHOW); pFrame->UpdateWindow(); return true; }
BOOL CMyWinApp::InitInstance(){ CMyFrameWnd* pFrame = new CMyFrameWnd; pFrame->Create(NULL,"MFCToolBar",WS_OVERLAPPEDWINDOW, CFrameWnd::rectDefault,NULL/*,MAKEINTRESOURCE(IDR_MENU1)*/); m_pMainWnd = pFrame; pFrame->ShowWindow(SW_SHOW); pFrame->UpdateWindow(); return true; }
BOOL CMyWinApp::InitInstance(){ //此函数的this为theApp CMyFrameWnd* pFrame = new CMyFrameWnd; pFrame->Create(NULL,"MFCBase"); m_pMainWnd = pFrame; //theApp.m_pMainWnd pFrame->ShowWindow(SW_SHOW); pFrame->UpdateWindow(); return true; }