The host calls the IOleObject::DoVerb method in response to end-user actions such as mouse clicks. In return, the ActiveX designer performs some action, either an action predefined by OLE or a custom action defined and implemented by the designer.
The following table lists predefined verbs:
Verb | Value | Description |
OLEIVERB_PRIMARY | 0L | Action that occurs when a user double-clicks the object. ActiveX designers should activate the object in place. |
OLEIVERB_SHOW | – 1 | Requests that the object show itself for editing or viewing. |
OLEIVERB_OPEN | – 2 | Requests that the object open itself in a new window. ActiveX designers may choose to ignore this verb. |
OLEIVERB_HIDE | – 3 | Removes the object's user interface from view. |
OLEIVERB_UIACTIVATE | – 4 | Activates the object in place, along with its complete set of user interface tools. |
OLEIVERB_INPLACEACTIVATE | – 5 | Activates the object in place without its user interface tools. |
OLEIVERB_DISCARDUNDOSTATE | – 6 | Requests that the object discard any "Undo" information. |
Except for OLEIVERB_PRIMARY, all the predefined verbs have negative values. ActiveX designers need not support all the predefined verbs. Whenever DoVerb is called with a negative value that the designer does not recognize, the designer should ignore the call and return E_NOTIMPL.
Positive values are reserved for custom verbs specific to an application. For example, an ActiveX designer might define a custom verb that displays a code window, to be applied when the user selects an object that can have code behind it. When DoVerb is called with a positive value the designer doesn't recognize, it should treat the unknown verb as the primary verb (OLEIVERB_PRIMARY), activate the current object, and return OLE_S_INVALIDVERB.