-
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 :p
-
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
-
i have a similar post here maybe itll get answered there also