Q Menu item change during runtime (2) 
Author Message
 Q Menu item change during runtime (2)

Hello again,

Can I use ModifyMenu to change the names of menu-items during runtime?
I've got a menu like this:

File   Edit  Setting   View   Tryout

Menu Tryout has one item called Text

I tried the following code in one of my MainFrame functions:

 CMenu* pMenu = GetMenu();
 CString strg = "NewText";
 pMenu->ModifyMenu(4,MF_BYPOSITION,0,strg);

The result is that not menu item 'Text' changes into 'NewText', but menu
'Tryout' changes into NewText.

What am I doing wrong, or do I need to use a different function for this.

Any help would be welcome, any code of course also.

Kimball



Sat, 18 Jan 2003 03:00:00 GMT  
 Q Menu item change during runtime (2)
Take a look in MSDN at

CMenu* CMenu::GetSubMenu( int nPos ) const;

You retrieve the menu bar, then you retrieve the submenu then you modify the
submenu.

Dan



Sat, 18 Jan 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Q: How can I change menu items during runtime

2. Change mdi background during runtime

3. value of struct member changes during runtime

4. adodc - changing the filter during runtime is possible?

5. Changing a Dialog's CAPTION during runtime

6. How To change a LTEXT Resource during runtime?

7. How to change language of interface during runtime?

8. Best way to change text attributes during runtime?

9. adodc: changing filter during runtime is possible?

10. Changing Tab Order during runtime

11. problem: How to change the background color of menu items and menu bar

12. How To change a LTEXT Resource during runtime?

 

 
Powered by phpBB® Forum Software