问题
How do you disable the Maximize button/capability in an SDI application?
回答1:
For completeness:
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
ModifyStyle(WS_MAXIMIZEBOX, 0);
<etc...>
}
回答2:
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
回答3:
You can see it here: How to disable maximize in SDI application
来源:https://stackoverflow.com/questions/906116/how-do-you-disable-the-maximize-button-in-mfc