在应用程序类(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);
在应用程序类(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…………
}
http://topic.csdn.net/t/20050710/19/4135232.html
没有特别好的解决方案
不过我记得屏蔽最大化按钮不用屏蔽最大化消息
也就是可以设置WS_MAXSIZEBOX风格
使用这句话后在设置WS_MAXSIZEBOX就会出现全屏的显示,而不是最大化
已经基本上解决了,原因我想还是和标题栏的最大化消息有关,尝试自己处理一下最大化消息