Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disabling Menu Items which disable Modal Dialogs.

Status
Not open for further replies.

andyk

Programmer
Jul 29, 2000
24
GB
Hi,

Can anyone help? I would like to invoke a modal dialog from a menu item/toolbar button and whilst the dialog is being displayed, I would like the menu item and button disabled. I have no problem doing this for the items which result in a modeless dialog being displayed. It is because I have modeless dialogs also that I want this odd action from the buttons when modal dialogs are displayed.

I need the ON_UPDATE_COMMAND_UI handler for my buttons to be called before and after the modal dialog is displayed.
Is the answer to send some message to the CMainFrame class? If so which one?

Maybe the only answer is to make all the existing modal dialogs modeless however this would be an expensive redesigned, any ideas?

Many Thanks Andy.
 
What messaegs to send is up to you. You can send every messages (inclusive yours defined) to which ibjects do you want. But better is to do what you want on Dialog's WM_CREATE and WM_DESTROY. John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top