:\zuijiandan\MainFrm.cpp(85) : error C2065: 'm_pMainWnd' : undeclared identifier D:\zuijiandan\MainFrm.cpp(85) : error C2227: left of '->ShowWindow' must point to class/struct/union
>>:\zuijiandan\MainFrm.cpp(85) : error C2065: 'm_pMainWnd' : undeclared identifier D:\zuijiandan\MainFrm.cpp(85) : error C2227: left of '->ShowWindow' must point to class/struct/union楼主脑壳就不会转一点点弯?
加在 APP 类的 InitInstance 函数末尾
D:\zuijiandan\MainFrm.cpp(85) : error C2227: left of '->ShowWindow' must point to class/struct/union
showwindow(SW_SHOWMAXIMIZED);
在主窗口的initialize函数中的return 语句之前调用.
D:\zuijiandan\MainFrm.cpp(85) : error C2227: left of '->ShowWindow' must point to class/struct/union楼主脑壳就不会转一点点弯?
用Doc/View结构
改写C***App::InitInstance{ showwindow(sw....)}效果并不会,它会先出现一个normal的窗体,然后马上最大化,一闪而过。
但实际上从MFC内部来讲,构造窗体的部分是CMainFrame:public CFrameWnd,所以在CMainFrame::OnCreate{中调用用CMainFrame的成员ShwoWindow}来修改框架窗体最合适。出来的就是最大化形式。
实际上,App复杂应用程序的构造、初始化、退出等,不负责构造窗体。