VLMenuPlus Reference

CMenuItem

See Also See Also Applies To Applies To

Object instances of this class are used in almost all of the events of VLMenuPlus control. This class exposes following properties. Some of these are read-only properties and they are marked accordingly.

Property Data Type Read Only Description
Caption String Yes Returns caption text for this menu item.
CaptionFont StdFont No Returns the font object for this menu item caption text.

You can change the properties of the font object, but can not replace the font object.

CaptionTextHeight Long Yes Returns the height of the caption text of the menu item as per current font settings.
CaptionTextWidth Long Yes Returns the width of the caption text of the menu item as per current font settings.
Checked Boolean Yes Returns True if the menu item is checked, otherwise returns False.
Disabled Boolean Yes Returns True if the menu item is disabled, otherwise returns False.
HasSubMenus Boolean Yes Returns True if the menu item has sub-menus, otherwise returns False.
hMenu Long Yes Handle of the menu to which this menu item belongs.
hWnd Long Yes Handle of the window to which this menu item belongs.
IsFirst Booean Yes Returns True if this menu item is the first item in a popup menu
IsLast Booean Yes Returns True if this menu item is the last item in a popup menu
IsSeparator Booean Yes Returns True if this menu item is a Separator bar.
IsTopLevel Booean Yes Returns True if this menu item is a part of the top menu bar, otherwise returns False.
Language Long No

Returns the language of the menu item.

This will decide the help message collection that will be looked up to get the default help message .

MenuId Long Yes Returns the Id of the menu item.
MenuText String Yes Returns the text correponding to the menu item, it includes the caption as well as the shortcut text.
ParentMenuId Long Yes

Returns the Command Id of the parent menu item.

For top level menu items it returns -1.

Picture StdPicture No Returns the Picture used for showing a bitmap next to the menu text.

You can set a new picture for the menu item.

PictureBackColor OLE_COLOR No Returns the background color in the picture.

If you specify a Picture, you should also specify the PictureBackground color so that the menu bitmap shows up correctly on all desktop coloring schemes.

ShortcutFont StdFont No

Returns the font object for this menu item shortcut text.

You can change the properties of the font object, but can not replace the font object.

ShortcutText String Yes Returns the text corresponding to the shortcut key specified for this menu item
ShortcutTextHeight Long Yes Returns the height of the shortcut text of the menu item as per current font settings.
ShortcutTextWidth Long Yes Returns the width of the shortcut text of the menu item as per current font settings.
ToolTipText String No

Sets/Returns the text that will be displayed in the tooltip corresponding to this menu item. By default, this is set equal to the corresponding status bar help message.

A different tooltip text can be specified in SetMenuItemAttributes event.

Unicode Boolean No Setting this property to TRUE will allow you to use unicode string and font for this menu's caption.

This property will be initialized to same value as you have specified for Unicode property of the control. It can be overriden in the SetMenuItemAttributes event.