
Help with ownerdraw menu!
Hya all!
I'm coding a program launcher and I use a loop to add programs to the menu.
I see a lot of guys do this:
AppendMenu((HMENU)wParam, MF_OWNERDRAW, i+1, (const char*)i);
and something like this in a WindowProc function
if ( 1 <= wParam && wParam < 1+n_MAXITEM ) {
blablbla
Quote:
}
This obviously means that the menuitem has been clicked.
I know the i+1 is the ID of the menu item. But when I use this, I can't get
a WM_COMMAND
from the menu? Any ideas?
I always use something like ID_POPUP_PROGRAM1 or something this will work,
but
as you can see this is a very difficult way, and you can't use infinite menu
items.
Any help would be appreciated!!
Cya
Da Phoenix