Enabling a menu
Hey guys, im trying to enable a menu item that is by default MFS_GRAYED, that is my shot:
But it dont change the menu item status.
a.fMask = MIIM_STATE;
a.fState = MFS_ENABLED;
What im doeing wrong?
[in, out] Pointer to a MENUITEMINFO structure that specifies the information to retrieve and receives information about the menu item. Note that you must set MENUITEMINFO.cbSize to sizeof(MENUITEMINFO) before calling this function.
But theMSDN example code is exactly as mine, the sctruct defined as MENUITEMINFO and the function member as "&a".
Oh... and if i set cbsize to (sizeof)a, the situation continues the same
Check return values of API's, getlasterror.
It said "a menu item wasnt found". So i realized that the menu was not hMenu, it was hSubMenu, but not the error that it return is "incorrect paramter").
Sorry if the error messages are not exactly it, but they appear in portuguese here, and i try to translate it :P