CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Location
    Spain
    Posts
    335

    How can I get the text from a resource..

    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

  2. #2
    Join Date
    Sep 1999
    Location
    Europe / Austria / Innsbruck
    Posts
    442

    Re: How can I get the text from a resource..

    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();






Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured