About MenuBar and MenuItem Command Nummber

Posted on 1999-08-02
Medium Priority
Last Modified: 2013-12-26
How to modify MenuBar Titles, which string length is dynamic? Do it in the program code.
When I dynamicly insert a MenuItem to a Menu in program, How can I add Command Nummber for the MenuItem?
Question by:Fifth
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Author Comment

ID: 1291917
Edited text of question.

Accepted Solution

AstroMan earned 100 total points
ID: 1291918
For changing the title of a menu, you can change its name in its menuData field. After, remove it from the menubar, reinstall it and call DrawMenuBar(). For the menuitem command number, use SetMenuItemCommandID(MenuHandle menu, short item, long command), but you must have the Appearance Manager installed.

Author Comment

ID: 1291919
To the MenuBar Title,I want to know details on removing and reinstall.If my new title is longer than old,Is this approach useful?
How can I get the appearance manager, it is in ToolBox or in PowerPlant or in others?

Expert Comment

ID: 1291920
I think the function of SetMenuItemCommandID is not so useful, when I added a new menu item to system help menu I found the inCommand is always equal to 1080688635, it is so strange. and I can not find the function's definiens. Who can make it clear for me!

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

719 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