OleUIAddVerbMenu
Adds the Verb
menu for the specified object to the given menu.
BOOL OleUIAddVerbMenu(
LPOLEOBJECT *lpOleObj, |
//Pointer to the object |
LPCTSTR lpszShortType, |
//Pointer to the short name corresponding to the
object |
HMENU hMenu, |
//Handle to the menu to modify |
UINT uPos, |
//Position of the menu item. |
UINT uIDVerbMin, |
//Value at which to start the verbs |
UINT uIDVerbMax, |
//Maximum identifier value for object verbs |
BOOL bAddConvert, |
//Whether to add convert item |
UINT idConvert, |
//Value to use for the convert item |
HMENU FAR
* lphMenu |
//Pointer to the cascading verb menu, if created |
); |
|
Parameters
lpOleObj
[in] Pointer
to the IOleObject interface on the selected object. If this is NULL,
then a default disabled menu item is created.
lpszShortType
[in] Pointer
to the short name defined in the registry (AuxName==2) for the object
identified with lpOleObj. If the string is NOT known, then NULL may be
passed. If NULL is passed, IOleObject::GetUserType is called to retrieve
it. If the caller has easy access to the string, it is faster to pass it in.
hMenu
[in] Handle
to the menu in which to make modifications.
uPos
[in] Position
of the menu item.
iIDVerbMin
[in] The UINT
identifier value at which to start the verbs.
uIDVerbMax
[in] The UINT
Maximum identifier value to be used for object verbs. If uIDVerbMax
is 0, then no maximum identifier value is used.
bAddConvert
[in] The BOOL
specifying whether or not to add a Convert item to the bottom of the menu
(preceded by a separator).
idConvert
[in] The UINT
identifier value to use for the Convert menu item, if bAddConvert is
TRUE.
lphMenu
[out] An
HMENU pointer to the cascading verb menu if it's created. If there is
only one verb, this will be filled with NULL.
Return Values
TRUE
Indicates lpOleObj
was valid and at least one verb was added to the menu.
FALSE
Indicates lpOleObj
was NULL and a disabled default menu item was created.
Remarks
If the object
has one verb, the verb is added directly to the given menu. If the object has
multiple verbs, a cascading sub-menu is created.