Solved

Change Menu Pulldown string?

Posted on 2001-07-25
1
283 Views
Last Modified: 2013-11-20
Hi.
I want to change the strings in a menu programatically.
I have a menu resource that gets loaded by my CFrameWnd.
I figured out how to alter the items in the menu:

* override ::OnCreate() in CFrameWnd
* GetMenu()->ModifyMenu(id,MF_BYCOMMAND|MF_STRING,id,"newstring");

However I do not know how to change the string in the pulldown itself.
(ie: File, Edit, Help, etc)

Does anybody know how to do this?

Thanks.
0
Comment
Question by:bwilhelm
1 Comment
 
LVL 49

Accepted Solution

by:
DanRollins earned 100 total points
ID: 6320361
I think you wnat to modify the text in the menubar.  If so, you need to use positions rather that commands.  For instance, this changes the title of the seconf menu item (usually "&Edit") to "&Whaz UP!"

  GetMenu()->ModifyMenu( 1, MF_BYPOSITION|MF_STRING, 2, "&Whaz UP!" );

-- Dan
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C++ BOOL WINAPI ReadFile fails on windows 10 when reading from USB cable 9 428
unable to delete all specified values regedit 38 393
EvenOdd challenge 10 107
MaxSpan challenge 9 95
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question