16,472
社区成员
发帖
与我相关
我的任务
分享
在应用程序类(CxxAPP)的 InitInstance 函数中设定 m_nCmdShow的取值.
m_nCmdShow=SW_SHOWMAXIMIZED; //最大化
例:
BOOL CMyEditApp::InitInstance()
{
AfxEnableControlContainer();
m_nCmdShow=SW_SHOWMAXIMIZED; //最大化
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
…………
}
// 主框架类中
PostMessage(WM_SYSCOMMAND, SC_MAXIMIZE, 0);