Results 1 to 3 of 3

Thread: Addin in a menu

  1. #1

    Thread Starter
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Addin in a menu

    hey im trying to create an menu addin, i can create the menu item and but all of the submenu items are disabled? is there a differnet function that should be used?

    Code:
    ghwnd_Kazaa = FindWindow("KaZaA",NULL);
    hKazaaMain = GetMenu(ghwnd_Kazaa);
    HMENU hSubMenu = NULL;
    hSubMenu = CreatePopupMenu();
    AppendMenu(hSubMenu,MF_STRING | MF_ENABLED,MENU_ADDIN,"A&ddIn");
    AppendMenu(hKazaaMain,MF_STRING | MF_POPUP | MF_ENABLED,(UINT_PTR)hSubMenu,"A&ddIn");
    SetMenu(ghwnd_Kazaa,hKazaaMain);
    cheers

  2. #2
    Frenzied Member JasonLpz's Avatar
    Join Date
    Mar 2001
    Location
    Brooklyn, NY
    Posts
    1,335
    when you did this did you make a menu resource on your form? im tried
    Code:
    HWND i;
    HMENU x;
    HMENU y = NULL;
    
    i = ::FindWindow("KaZaA",0);
    x = ::GetMenu(i);
    //y = ::CreateMenu();
    //::AppendMenu(y,MF_ENABLED | MF_STRING,ID_MN_ONE,"Jason");
    y = CreatePopupMenu();
    AppendMenu(y,MF_STRING | MF_ENABLED,ID_MN_ONE,"A&ddIn");
    AppendMenu(x,MF_STRING | MF_POPUP | MF_ENABLED,(UINT_PTR)y,"A&ddIn");
    
    ::SetMenu(i,x);
    and nothing seems to work for me i dont get any errors then again i dont get the menu to appear
    - JayWare
    Live to love. Not to Hate

    Im to busy to have a site. But I got one and still working on it.

    http://dre3k.net/

  3. #3
    Frenzied Member JasonLpz's Avatar
    Join Date
    Mar 2001
    Location
    Brooklyn, NY
    Posts
    1,335
    i have a similar post here maybe itll get answered there also
    - JayWare
    Live to love. Not to Hate

    Im to busy to have a site. But I got one and still working on it.

    http://dre3k.net/

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