Export (0) Print
Expand All

OleUIAddVerbMenu function

Adds the Verb menu for the specified object to the specified menu.


BOOL OleUIAddVerbMenu(
  _In_opt_  LPOLEOBJECT lpOleObj,
  _In_opt_  LPCTSTR lpszShortType,
  _In_      HMENU hMenu,
  _In_      UINT uPos,
  _In_      UINT uIDVerbMin,
  _In_      UINT uIDVerbMax,
  _In_      BOOL bAddConvert,
  _In_      UINT idConvert,
  _Out_     HMENU *lphMenu


lpOleObj [in, optional]

Pointer to the IOleObject interface on the selected object. If this is NULL, then a default disabled menu item is created.

lpszShortType [in, optional]

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.

uIDVerbMin [in]

The identifier value at which to start the verbs.

uIDVerbMax [in]

The maximum identifier value to be used for object verbs. If uIDVerbMax is 0, then no maximum identifier value is used.

bAddConvert [in]

Indicates whether to add a Convert item to the bottom of the menu (preceded by a separator).

idConvert [in]

The 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 value

This function returns TRUE if lpOleObj was valid and at least one verb was added to the menu. A FALSE return indicates that lpOleObj was NULL and a disabled default menu item was created.


If the object has one verb, the verb is added directly to the given menu.


Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]







Unicode and ANSI names

OleUIAddVerbMenuW (Unicode) and OleUIAddVerbMenuA (ANSI)



Community Additions

© 2015 Microsoft