PDA

Click to See Complete Forum and Search --> : AppendMenu API


Mithyrl
Jan 16th, 2001, 03:23 PM
I am using the AppendMenu API to create popup menu items at run time for a right click operation.

I have created a menu in my MDI Form and set its Visible property to false so it will not be displayed.

My problem is when I am using AppendMenu it does not add any items to the popup unless the menu I am adding the items to is Visible.

Sample code:



AppendMenu GetSubMenu(GetMenu(mdiForm1.hwnd), 1), MF_BYPOSITION, 0, "Menu Item Text"

PopupMenu mdiForm1.mnuPopup



I know I could use another form and put the menu there but I would rather not do that.....any suggestions?