Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Changing top Menu titles
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Changing top Menu titles

 Post Reply Post Reply
Author
Message
Lucien View Drop Down
Newbie
Newbie
Avatar

Joined: 21 May 2004
Location: Canada
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lucien Quote  Post ReplyReply Direct Link To This Post Topic: Changing top Menu titles
    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?

Back to Top
Lucien View Drop Down
Newbie
Newbie
Avatar

Joined: 21 May 2004
Location: Canada
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lucien Quote  Post ReplyReply Direct Link To This Post Posted: 05 July 2004 at 2:35pm

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?

Back to Top
ICBM View Drop Down
Groupie
Groupie


Joined: 15 January 2004
Location: New Zealand
Status: Offline
Points: 57
Post Options Post Options   Thanks (0) Thanks(0)   Quote ICBM Quote  Post ReplyReply Direct Link To This Post Posted: 05 July 2004 at 5:21pm
Do you really need to do this dynamically ? Why not just edit the .rc file ?
Back to Top
Lucien View Drop Down
Newbie
Newbie
Avatar

Joined: 21 May 2004
Location: Canada
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lucien Quote  Post ReplyReply Direct Link To This Post Posted: 06 July 2004 at 8:09am
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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.189 seconds.