|
-
May 7th, 1999, 12:07 PM
#1
Disable the close X in a dialog box
Does anyone know how to disable the close x in the upper right corner? I havent found any information on this
thanks
Rich
-
May 7th, 1999, 01:16 PM
#2
Re: Disable the close X in a dialog box
You could simply override OnCancel() to do nothing.
Howard
-
May 7th, 1999, 01:34 PM
#3
Re: Disable the close X in a dialog box
I guess I left something out... This is a modeless dialog and OnCancel doesnt seem to get called if you click on the X. I have a busy state where a thread has to be shut down before exiting.
-
May 7th, 1999, 03:15 PM
#4
Re: Disable the close X in a dialog box
Try trapping WM_CLOSE (OnClose).
Gort...Klaatu, Barada Nikto!
-
May 7th, 1999, 05:10 PM
#5
Re: Disable the close X in a dialog box
Put in a handler for WM_CLOSE
and do not call the default base class handler.
-
May 7th, 1999, 10:13 PM
#6
Re: Disable the close X in a dialog box
All replies are good. But without gray the X button, the app won't look professional. The function DrawFrameControl() may help.
xiaolong wu
-
May 8th, 1999, 02:00 PM
#7
Re: Disable the close X in a dialog box
Put this into yoour dialogs OnInitDialog function...
CMenu* sysMenu = this->GetSystemMenu(FALSE);
sysMenu->EnableMenuItem(SC_CLOSE, MF_GRAYED);
-
May 9th, 1999, 10:20 PM
#8
Re: Disable the close X in a dialog box
How about disabling the Title bar check box on the dialog property...(system menu)... so all you would have is the dialogue without anything on top
-
May 9th, 1999, 10:54 PM
#9
Re: Disable the close X in a dialog box
Thanks, it works like a charm...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|