Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to change the Menu text in runtime ?

367 views
Skip to first unread message

Burhan Yakisir

unread,
Jun 30, 2000, 3:00:00 AM6/30/00
to

Von: Burhan Yakisir <Burhan....@caeub2.de>
Betreff: How to change the Menu text in runtime ?
Datum: Freitag, 30. Juni 2000 10:07

Hello,
can anyone tell me how i can change the Text for the Menuitems during
runtime ?
Many thanks.

Thomas Koene

unread,
Jun 30, 2000, 3:00:00 AM6/30/00
to

Hello,

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

David Lowndes

unread,
Jun 30, 2000, 3:00:00 AM6/30/00
to
>can anyone tell me how i can change the Text for the Menuitems during
>runtime ?

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.

Burhan Yakisir

unread,
Jun 30, 2000, 3:00:00 AM6/30/00
to
Thanks a lot. It works!

Burhan Yakisir

unread,
Jun 30, 2000, 3:00:00 AM6/30/00
to
Thanks a lot. It works!

Burhan Yakisir

unread,
Jun 30, 2000, 3:00:00 AM6/30/00
to
Oh it does not work, sorry!
It does not pastes the text in the Menu Item

beet...@my-deja.com

unread,
Jun 30, 2000, 3:00:00 AM6/30/00
to
Yup,

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.

0 new messages