Print Page | Close Window

Changing top Menu titles

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=850
Printed Date: 25 December 2024 at 9:10am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Changing top Menu titles
Posted By: Lucien
Subject: Changing top Menu titles
Date 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?




Replies:
Posted By: Lucien
Date 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?



Posted By: ICBM
Date Posted: 05 July 2004 at 5:21pm
Do you really need to do this dynamically ? Why not just edit the .rc file ?


Posted By: Lucien
Date 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.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net