erajoj
asked on
Disabling close button
Is there any way to disable (or even hide) a window caption's close button, i.e. the top right button of a ws_sysmenu style window. I can already prevent a window from closing, so that is not what I'm asking for.
I have seen MDI child windows with this button disabled, so there has to be a way?!
Since I don't ask a lot of questions, a good answer will be worth a bunch.
/// John
I have seen MDI child windows with this button disabled, so there has to be a way?!
Since I don't ask a lot of questions, a good answer will be worth a bunch.
/// John
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Put the codes under the OnCreate() function. For MDI child windows, add member function for WM_CREATE message in CChildFrame class.
ASKER
Thanx a bunch for the swift answer!
This is for the Delphi group, hope you don't mind.
/// John
This is for the Delphi group, hope you don't mind.
/// John
Or simpler:
CMenu *MyMenu; MyMenu = GetSystemMenu(FALSE);
MyMenu->EnableMenuItem(SC_