Solved

Change Menu Pulldown string?

Posted on 2001-07-25
1
280 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now