Hello,
can anyone tell me how i can change the Text for the Menuitems during
runtime ?
Many thanks.
to change the menu item test, you can use the function
CMenu::ModifyMenu(.....).
i.e.
CMenu *pMen = GetMenu(); // Get a pointer to the menu within the window
class
pMen->ModifyMenu( ID_MNU_EXAMPLE, MF_BYCOMMAND, ID_MNU_EXAMPLE, "This is a
test" ); // call Modify menu to change the text
In the menu command UI handler (ON_UPDATE_COMMAND_UI), you can use
CCmdUI::SetText.
Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.
That knowledgbase article (Q135788) clears it up, but what is
interesting is that under STATUS it says 'This behaviour is by design'
I think that speaks volumes!
-Zak
In article <ia6plskp7fu9gq4hd...@4ax.com>,
Sent via Deja.com http://www.deja.com/
Before you buy.