How do you disable the Maximize button in MFC?

久未见 提交于 2020-01-03 17:01:15

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!