|
-
Nov 24th, 2001, 10:20 AM
#1
Adding a MenuItem in another application?...
Hi,
I want to add my own menu-item to a menu in another application.
Can anyone help me getting started with this? I'm guessing I have to hook into the other application but I have no idea how to do that. So a few quations actually:
1) How do I monitor the application I want to add a menu, how do I know it's being started so I can perform an action on it?
2) How do I get the menuhandle from that application?
3) How do I add my own menu-items to it?
Any help would be great, thnx
-
Nov 24th, 2001, 08:19 PM
#2
um well...
I managed to insert a new menu-item in the other application but....
I have a menu in my vb-project with subitems which I want to insert into the other app. I use InsertMenu to add this menu to the menu of the other app but all it does is add a single item which won't popup the subitems...
This is the code I use:
hOtherMenu = GetMenu(window.hWnd)
menuCount = GetMenuItemCount(hOtherMenu)
hMyMenu = GetMenu(Me.hWnd)
hMySubMenu = GetSubMenu(hMyMenu, 0) 'this one has 2 menu-items
'add my menu to the other menu
lReturn = InsertMenu(hOtherMenu, menuCount, MF_BYPOSITION Or MF_POPUP, hMySubMenu, "Test")
So why doesn't it insert my 2 items into the menu? Please help...
-
Nov 25th, 2001, 11:54 AM
#3
-
Nov 26th, 2001, 12:34 PM
#4
Nobody?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|