Results 1 to 4 of 4

Thread: Adding a MenuItem in another application?...

  1. #1
    CharlyDoes
    Guest

    Question 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

  2. #2
    CharlyDoes
    Guest

    Lightbulb 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...

  3. #3
    CharlyDoes
    Guest
    Any ideas?....

  4. #4
    CharlyDoes
    Guest
    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
  •  



Click Here to Expand Forum to Full Width