Hi
I hope anybody can help me.
I my application, you can deactivate the maximize/minimize/close button of custom windows.
In Window10 look an feel my code does not work anymore like in windows 7.
The buttons maximize and minimize do not gray out anymore, they disappear.
And deactivating the close button has no effect anymore.
What do I have to change to get the same behavior again?
Is there a way to still gray them out?
Thank you in advance
What I have tried:
if (!m_bActiveMaximizeButton)
{
this->ModifyStyle(WS_CAPTION|WS_MAXIMIZEBOX,0,0);
this->ModifyStyle(0,WS_CAPTION,SWP_FRAMECHANGED);
} else
{
this->ModifyStyle(WS_CAPTION,0,0);
this->ModifyStyle(0,WS_CAPTION,SWP_FRAMECHANGED);
}
if (!m_bActiveMinimizeButton)
{
this->ModifyStyle(WS_CAPTION|WS_MINIMIZEBOX,0,0);
this->ModifyStyle(0,WS_CAPTION,SWP_FRAMECHANGED);
} else
{
this->ModifyStyle(WS_CAPTION,0,0);
this->ModifyStyle(0,WS_CAPTION,SWP_FRAMECHANGED);
}
CMenu* menue = this->GetSystemMenu(FALSE);
if (!m_bActiveCloseButton)
{
menue->ModifyMenu(SC_CLOSE, MF_BYCOMMAND | MF_GRAYED);
} else
{
menue->ModifyMenu(SC_CLOSE, static_cast<UINT>(MF_BYCOMMAND | ~MF_GRAYED));
}