How do you disable the Maximize button/capability in an SDI application?
How do you disable the Maximize button in MFC?
Asked Answered
are you talking about a dialog or a SDI application ? you should edit the title. –
Kayceekaye
I edited the title. Next time, pam, please use a descriptive short version of the question as a title instead of "MFC dialog question" :) –
Hokku
For completeness:
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
ModifyStyle(WS_MAXIMIZEBOX, 0);
<etc...>
}
I prefer this to an external link that could be broken in the future. –
Yakka
ModifyStyle(WS_MAXIMIZEBOX,0,SWP_FRAMECHANGED); // disable maximize
ModifyStyle(WS_MINIMIZEBOX,0,SWP_FRAMECHANGED); // disable minimize
ModifyStyle(0,WS_MAXIMIZEBOX,SWP_FRAMECHANGED); // enable maximize
ModifyStyle(0,WS_MINIMIZEBOX,SWP_FRAMECHANGED); // enable minimize
try this, should be working
You can see it here: How to disable maximize in SDI application
© 2022 - 2024 — McMap. All rights reserved.