Link to home
Start Free TrialLog in
Avatar of Phil Chapman
Phil ChapmanFlag for United States of America

asked on

How to Add / Edit Windows Menu

I would like to add a menu item to Windows normal text box when the r-button is pressed this menu item would need  3 sub menu item.  Of course I would need to know when each sub-menu item has been selected.  I believe I did this several years ago using API calls but I do not remember how.  A sample project would be appreciated.




User generated image
Avatar of ste5an
ste5an
Flag of Germany image

Do you mean GetMenu() and InsertMenuItem()?

Declare Function GetMenu Lib "user32.dll" ( 
                 ByVal hwnd As Long) As Long
Declare Function InsertMenuItem Lib "user32.dll" _
                 Alias "InsertMenuItemA" ( _
                 ByVal hMenu As Long, _
                 ByVal un As Long, _
                 ByVal bool As Boolean, _
                 lpcMenuItemInfo As MENUITEMINFO) As Long

Open in new window

Avatar of Phil Chapman

ASKER

Can you create an vb6 example of adding a Windows System menu item and retrieving the selected item.
ASKER CERTIFIED SOLUTION
Avatar of ste5an
ste5an
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the help