Answered by:
Problem on MIIM_STATE

Question
-
Hi
I set a menu item to bold by MIIM_STATE and MFS_DEFAULT and it works bu when i retrive the menu item state again by MIIM_STATE the (fState & MFS_DEFAULT) member of MENUITEMINFO is zero. It seems the MIIM_STATE not work on GetMenuItemInfo!
Sunday, November 20, 2016 7:35 PM
Answers
All replies
-
Are you working with an item in a menu (i.e., top level menu opened from the menu bar) or in a submenu? Documentation seems to imply that default items pertain to submenus --
Default Menu Items
A submenu can contain one default menu item. When the user opens a submenu by double-clicking, the system sends a command message to the menu's owner window and closes the menu as if the default command item had been chosen. If there is no default command item, the submenu remains open. To retrieve and set the default item for a submenu, use the GetMenuDefaultItem and SetMenuDefaultItem functions.
- Edited by RLWA32 Sunday, November 20, 2016 8:12 PM
Sunday, November 20, 2016 8:11 PM -
I make the menu owner draw and i need to detect the menu item is bold on OnDrawItem(), How to do it?
Also GetMenuDefaultItem not work!- Edited by drjackool Monday, November 21, 2016 2:57 AM
Monday, November 21, 2016 2:49 AM -
-
I did it but not work! I am mixed.Monday, November 21, 2016 3:06 AM
-