thanks for all. you have right. but i was doing more errors too:
1 2 3 4 5 6 7 8 9 10
case WM_MENUCOMMAND:
{
MENUITEMINFO menuInfo;
menuInfo.cbSize = sizeof(MENUITEMINFO);
menuInfo.fMask=MIIM_DATA;
GetMenuItemInfo((HMENU)lParam,(UINT) wParam, true, &menuInfo );//true means by position
Menu *mMenu = (Menu *) menuInfo.dwItemData;
mMenu->MenuClick();
}
break;
now works like i need. thanks.
i need ask 1 confusion that i have:
1 - when we change the menu properties(string, bitmap), what menu handle we use?
2 - when we add a new item to menu, what menu handle we use?
don't be confused/bad with my questions... i'm asking these, because i'm confused. and sometimes i get wrong results because of that :(