Dialog Based & Menu Update :: MFC 
Author Message
 Dialog Based & Menu Update :: MFC

Hi.

I have two questions about menu in a dialog based
application.

First, how do you add an on command for menu items in a
dialog based app? In other words, without ON_COMMAND how
do you add an event handle for menu item?

Second, I saw two solutions for updating, i.e. enable or
disable, menu items in a dialog based app.

1) CMenu *pMenu = GetMenu(0)

This solutions is exactly like updating contextmenu. Am I
correct? Do you have to call function to redraw the menu?

2) Add an event handle for WM_KICKIDLE

http://www.*-*-*.com/

I would like to know the preferred solution for updating
menu items in a dialog based app.

Thanks,
Kuphryn



Mon, 21 Feb 2005 21:43:19 GMT  
 Dialog Based & Menu Update :: MFC

Quote:

> I would like to know the preferred solution for updating
> menu items in a dialog based app.

I don't know about preferred, but you might take a look at MSDN Article Q242577, "PRB:Update Command
UI Handlers Do Not Work for Menu Attached to a Dialog Box".

--
Jeff Partch [MVP]



Tue, 22 Feb 2005 04:17:54 GMT  
 Dialog Based & Menu Update :: MFC
Okay.  Thanks.

JohnCz of CodeGuru criticized the use of a dialog based
app. He mentioned about using SDI without doc and using a
CFormView. What are you inputs on using CFormView? What
are the advantagesand disadvantages o using CFormView
over a dialog based app and vice versa?

kuphryn



Tue, 22 Feb 2005 17:24:58 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Dialog Based Apps - Menu & Windows :: MFC

2. Updating dialog based application menu status

3. update menu based on dialog resopnse

4. Updating dialog based application menu status

5. Problem updating Menu state with Dialog-based application

6. Updating menu items in dialog-based apps: Solution

7. Dialog Based Application & Menu

8. Context Menu & Dialog Box :: MFC

9. Adding Another MFC Dialog to the Dialog base application

10. PBM: Message box not displayed after main dialog box is closed in MFC dialog-based app

11. Updating the Taskbar from a dialog based app

12. Two Threads Updating Dialog based application

 

 
Powered by phpBB® Forum Software