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