About MenuBar and MenuItem Command Nummber

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?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

FifthAuthor Commented:
Edited text of question.
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
FifthAuthor Commented:
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?
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!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.