marcus78
asked on
change a menu item's text
I'd like be able to change the text of a menu item at runtime. In particular, I'm trying to change the text of the item which is normally edit->undo. I'm going for the same idea like in MS Word where it says "Undo Typing" or if you format some text it'll say "Undo Bold", etc...
So how can I change this dynamically? The id will always be ID_EDIT_UNDO.
Thanks,
Marcus
So how can I change this dynamically? The id will always be ID_EDIT_UNDO.
Thanks,
Marcus
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you don't use MFC than use SetMenuItemInfo API function. First you call GetMenu(hWnd), than GetSubMenu() for retrieving your "Edit" menu and than SetMenuItemInfo to set the new text.
ASKER
Whoa! I was completely overthinking that one. Thanks, Dan!
Marcus
Marcus