Changing top Menu titles |
Post Reply |
Author | |
Lucien
Newbie Joined: 21 May 2004 Location: Canada Status: Offline Points: 16 |
Post Options
Thanks(0)
Posted: 16 June 2004 at 4:24pm |
I was woundering how to change the title of the top-menu items (File, Edit, View, Help...) I know the code for changing items included in the diffrent menus: m_wndMenuBar.GetMenu()->GetSubMenu(0)->ModifyMenu(ID_F ILE_NEW, MF_BYCOMMAND, ID_FILE_NEW,"Nouveau"); I have tried the following but with no succes: m_wndMenuBar.GetMenu()->ModifyMenu(0, MF_BYPOSITION, MF_POPUP , "Fichier"); Can a top menu title be changed or we haft to destroy and recreate the menu? |
|
Lucien
Newbie Joined: 21 May 2004 Location: Canada Status: Offline Points: 16 |
Post Options
Thanks(0)
|
My menu is a CXTMenuBar declared like this: m_wndMenuBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || !m_wndMenuBar.LoadMenuBar(IDR_GUI_VITYPE)) The menu is created correclty. I tried also this with no success: m_wndMenuBar.GetMenu()->ModifyMenu(0, MF_BYPOSITION, 0 , "Fichier"); I want the first popup "File" to be renamed "Fichier". I looked on other Visual C++ forums for this answer and the above line of code is supposed to work. Is there something different when the menu is a CXTMenuBar? |
|
ICBM
Groupie Joined: 15 January 2004 Location: New Zealand Status: Offline Points: 57 |
Post Options
Thanks(0)
|
Do you really need to do this dynamically ? Why not just edit the .rc file ?
|
|
Lucien
Newbie Joined: 21 May 2004 Location: Canada Status: Offline Points: 16 |
Post Options
Thanks(0)
|
Yes, I need to do it dynamically. It's for language translation on the fly using a text file. This file contains all the menu file names in diffenrent languages.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |