i'm using the HiliteMenuItem() for test if the mouse is above the menu item:
int i=0;
for(i=0; i<GetMenuItemCount(menuhandle); i++)
{
if(HiliteMenuItem(HandleWindow,menuhandle,i,MF_BYPOSITION) == true)
{
menuposition=(UINT)i;
break;
}
}
but i always get the number 0. heres how i detect the menu handle:
case WM_INITMENUPOPUP:
{
menuhandle=(HMENU)wParam;
return 0;
}
break;
what i'm doing wrong?