我尝试这样的做法,但是这个最大化是全屏幕的,我想要的最大化是:
如果有windows的工具栏存在即显示工具栏以上的最大化,如果工具栏隐藏则显示全屏幕的最大化,大家有什么方法吗?注明:windows工具栏就是“开始”工具栏BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CMDIFrameWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs int nScreenX, nScreenY;
//Get width and height of current screen.
nScreenX = GetSystemMetrics(SM_CXSCREEN);
nScreenY = GetSystemMetrics(SM_CYSCREEN); //Set size of CREATESTRUCT structure.
cs.cx = nScreenX;
cs.cy = nScreenY; //Set style of Wnd, it means no Max button on the window.
cs.style &= ~WS_MAXIMIZEBOX; return TRUE;
}
如果有windows的工具栏存在即显示工具栏以上的最大化,如果工具栏隐藏则显示全屏幕的最大化,大家有什么方法吗?注明:windows工具栏就是“开始”工具栏BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CMDIFrameWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs int nScreenX, nScreenY;
//Get width and height of current screen.
nScreenX = GetSystemMetrics(SM_CXSCREEN);
nScreenY = GetSystemMetrics(SM_CYSCREEN); //Set size of CREATESTRUCT structure.
cs.cx = nScreenX;
cs.cy = nScreenY; //Set style of Wnd, it means no Max button on the window.
cs.style &= ~WS_MAXIMIZEBOX; return TRUE;
}
解决方案 »
- 关于ONLbuttondown函数的消息响应问题
- DLL修改主程序传入的结构变量(指针)成员时出错
- MSN实现界面用了特殊的DirectUI库,这套库的源代码哪里有下?
- 如何把 程序a 作为 程序b 的线程而创建,不行的话,把程序a的源代码包括资源 拷贝到程序b中,通过AfxBeginThread(CWinAppForA..)行不?
- 如何得到CListBox的控件宽度?!
- OPENGL中光照与放大缩小的问题
- CRYPTOAPI如何验证签名
- 如何判断一个矩形与圆等矢量图形有交点?
- 既然进程退出的时候会释放全身的自身资源,那么程序退出时还做清空处理干嘛用?
- 关于调试的问题
- 时间问题…………
- sendmessage
首先将m_pMainWnd->ShowWindow(SW_SHOW);屏蔽
然后:文档应用程序启动时最小消化
在应用程序的APP类的InitInstance中添加代码:
m_pMainWnd->ShowWindow(SW_MINIMIZE); 文档应用程序启动时最大消化
在应用程序的APP类的InitInstance中添加代码:
m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED);