How to remove close button?
I'm trying to remove the close button from the top right of my dialog with no luck. I want to keep the icon on the top right of the window and I don't want to just disable the close button, I need to remove it. Is there any way of doing this? I can't find a solution anywhere.
Thanks.
Dan.
Re: How to remove close button?
That should read "icon on the top left of the window"
Dan.
Re: How to remove close button?
Uncheck the System Menu box under the Style tab of the properties of your dialog box.
Re: How to remove close button?
That doesn't work. It removes the icon from the top left. I need to keep the icon.
Dan.
Re: How to remove close button?
Hi,
Use this code.
CMenu *pMenu = GetSystemMenu(FALSE);
// To disable the close icon and the system close menu
pMenu->DeleteMenu(SC_CLOSE,MF_BYCOMMAND);
All Luck.
http://www.geocities.com/contactgirish/homepage.html >>> VC++ Links, Code, Downloads & Notes.
Re: How to remove close button?
That doesn't work either. It only disables the button. I need to remove it.
Dan.
Re: How to remove close button?
ModifyStyle( WS_SYSMENU, 0, 0 );
Re: How to remove close button?
In Resource editor, open Dialog property dialog,
in "Styles" tab, uncheck out "System Menu".
HI, :-)....
Nice to meet u.
Re: How to remove close button?
Why dont you set the form style so that both the icon and close button are not visible, then BitBlt the icon and caption text onto the caption of the form. This is possible in VB so it MUST be possible in C++