Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I create menu items at run time?

Status
Not open for further replies.

dtrotzjr

Technical User
Feb 5, 2001
11
US
I need some help. I want to be able to create menu items at run time but I run into the problem of not being able to handle the message mapping portion of the job. How do I handle dynamicly created menu items at run time if I have no idea what the ID will be for the item? If I am too vague tell me and I will explain better what I want to accomplish. Thanks in advance for your help.
David Trotz Jr.
 
HMENU hMenu=CreateMenu();
HMENU hSubMenu=AppendMenu(hMenu,MF_STRING,ITEM_ID,"xxx");
hSubMenu=AppendMenu(hSubMenu,MF_STRING,ITEM_ID1,"xxx");
hSubMenu=AppendMenu(hSubMenu,MF_STRING,ITEM_ID2,"xxx");
hSubMenu=AppendMenu(hSubMenu,MF_STRING,ITEM_ID3,"xxx");

What do you think about ITEM_ID? John Fill
1c.bmp


ivfmd@mail.md
 
I want to insert an arbitrary number of menu items under an existing Menu.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top