Click to See Complete Forum and Search --> : How can I get the text from a resource..


Braulio
September 13th, 1999, 08:19 AM
Hi,

I have defined a context menu, and I would like to get sometimes ( when the context menu is not shown), the text of one of the options, for example I have defined IDM_OPTION1 and has the text( "this is the option one"), is there anyway to get the text from that resource ?

Thanks, Bye !
Braulio

Braulio El loco de Alemania...
Málaga - Oehningen - Schaffhausen

Thomas Ascher
September 13th, 1999, 08:28 AM
The following code will get the text of a menu resource:

CMenu menu;
CString strText;
menu.LoadMenu(IDM_MYMENU);
menu.GetMenuString(IDM_OPTION1, strText, MF_BYCOMMAND);
menu.DestroyMenu();