Disable Restoredown button
-
I have created an SDI application which i want to start maximised and disable the Restore button. For which i have written the following line in IniInstance().
m_pMainWnd->ModifyStyle(WS_MAXIMIZEBOX,0);
m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED);
m_pMainWnd->UpdateWindow();With the above lines the window is shown maximised and the Restoredown button looks disabled. But when I double click the Titlebar, the window is being restored and can not be maximised then. I want the window to be maximised or minised, but not to be resotred down. How to do that. Thank you
Saadhinchaali
-
I have created an SDI application which i want to start maximised and disable the Restore button. For which i have written the following line in IniInstance().
m_pMainWnd->ModifyStyle(WS_MAXIMIZEBOX,0);
m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED);
m_pMainWnd->UpdateWindow();With the above lines the window is shown maximised and the Restoredown button looks disabled. But when I double click the Titlebar, the window is being restored and can not be maximised then. I want the window to be maximised or minised, but not to be resotred down. How to do that. Thank you
Saadhinchaali
You're probably better off handling
WM_GETMINMAXINFO
, and telling Windows what you want the minimum and maximum size of your window to be (hint: same size as the screen!). -
I have created an SDI application which i want to start maximised and disable the Restore button. For which i have written the following line in IniInstance().
m_pMainWnd->ModifyStyle(WS_MAXIMIZEBOX,0);
m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED);
m_pMainWnd->UpdateWindow();With the above lines the window is shown maximised and the Restoredown button looks disabled. But when I double click the Titlebar, the window is being restored and can not be maximised then. I want the window to be maximised or minised, but not to be resotred down. How to do that. Thank you
Saadhinchaali
Try handling the WM_SYSCOMMAND messages (OnSysCommand) and swalow the restore (SC_RESTORE) message. Don't know how reliable that is though...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
-
I have created an SDI application which i want to start maximised and disable the Restore button. For which i have written the following line in IniInstance().
m_pMainWnd->ModifyStyle(WS_MAXIMIZEBOX,0);
m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED);
m_pMainWnd->UpdateWindow();With the above lines the window is shown maximised and the Restoredown button looks disabled. But when I double click the Titlebar, the window is being restored and can not be maximised then. I want the window to be maximised or minised, but not to be resotred down. How to do that. Thank you
Saadhinchaali
-
I have created an SDI application which i want to start maximised and disable the Restore button. For which i have written the following line in IniInstance().
m_pMainWnd->ModifyStyle(WS_MAXIMIZEBOX,0);
m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED);
m_pMainWnd->UpdateWindow();With the above lines the window is shown maximised and the Restoredown button looks disabled. But when I double click the Titlebar, the window is being restored and can not be maximised then. I want the window to be maximised or minised, but not to be resotred down. How to do that. Thank you
Saadhinchaali