VBGood网站全文搜索 Google

返回 发表评论(0) 首页 - API手册 - MENUITEMINFO


cbSize As Long
fMask As Long
fType As Long
fState As Long
wID As Long
hSubMenu As Long
hbmpChecked As Long
hbmpUnchecked As Long
dwItemData As Long
dwTypeData As Long
cch As Long
End Type

这个结构包含了菜单条目的信息,不支持win nt 3.51(原文:This structure contains information about a menu entry. Not supported on NT 3.51)

字段 类型及说明
cbSize Long,结构大小,通常为44bytes(Size of this structure, currently at 44 bytes.)
fMask Long,Specifies the information to set or get. Any combination of the following
MIIM_CHECKMARKS Sets or gets the hbmpChecked and hbmpUnchecked fields
MIIM_DATA Sets or gets the dwItemData field
MIIM_ID ets or gets the wID field
MIIM_STATE Sets or gets the fState field
MIIM_SUBMENU Sets or gets the hSubMenu field
MIIM_TYPE Sets or gets the fType and dwTypeData fields
fType Long,Menu item type, any combination of the following with the exception that MFT_BITMAP, MFT_SEPARATOR, and MFT_STRING cannot be combined with one another:MFT_BITMAP: Displays the menu item using a bitmap. dwTypeData contains the bitmap handle.MFT_MENUBARBREAK: The menu item is placed on a new line for top level menus, a new column for popup menus. Places a line between the columns.MFT_MENUBREAK: Same as MFT_MENUBREAK without the vertical line.MFT_OWNERDRAW: The menu item is an owner-draw menu.MFT_RADIOCHECK: Uses a radio button (option button) bullet to indicate the checked state instead of a check mark. Applies if no custom bitmap is specified.MFT_RIGHTJUSTIFY: Right-justifies a top level menu item.MFT_SEPARATOR: The entry is a separator line in a pop-up menu.MFT_STRING: The entry contains a string. dwTypeData contains the address of the string, and the cch field contains the length of the string.
fState Long,Current menu entry state or action to take. May be any combination of the following:MFS_CHECKED: Entry is checked.MFS_DEFAULT: The entry is a default item (appears in bold).MFS_DISABLED: Entry is disabled.MFS_ENABLED: Entry is enabled.MFS_GRAYED: Entry is grayed and disabled.MFS_HILITE: Entry is highlighted.MFS_UNCHECKED: Entry is unchecked.MFS_UNHILITE: Entry is unhighlighted.
wID Long,Menu entry identifier. The high 16 bits are not used.
hSubMenu Long,Handle to a pop-up menu if one is associated with the menu entry
hbmpChecked Long,Handle to a bitmap to display for a menu entry when checked. Zero to use the default
hbmpUnchecked Long,Handle to a bitmap to display for a menu entry when unchecked. Zero to use the default
dwItemData Long,User-defined value associated with this entry.
dwTypeData Long,Depends on the menu type
cch Long,Length of the menu string when MFT_STRING is specified. Zero for other menu types.