The IMAPIForm::DoVerb method requests that the form perform whatever tasks it associates with a specific verb.
See IMAPIForm : IUnknown.
HRESULT DoVerb(
LONG iVerb,
LPMAPIVIEWCONTEXT lpViewContext,
ULONG hwndParent,
LPCRECT lprcPosRect
);
Form viewers call the IMAPIForm::DoVerb method to request that the form perform the tasks that it associates with each of the verbs that the form supports.
Each of the supported verbs is identified by a numeric value, passed to DoVerb in the iVerb parameter. Typical implementations of DoVerb contain a switch statement that tests the values that are valid for the iVerb parameter for the form.
If the form viewer specifies a view context in the lpViewContext parameter, use it in your DoVerb implementation rather than the view context passed in an earlier call to the IMAPIForm::SetViewContext method. Make whatever changes that are necessary to your internal data structures and do not save the view context.
Perform the following tasks in your DoVerb implementation:
Some verbs, such as Print, should be modal with respect to the DoVerb call — that is, the indicated operation must be finished before the DoVerb call returns.
To obtain the RECT structure used by a form's window, call the Win32 function GetWindowRect.
Do not save the handle in the hwndParent parameter because although it usually remains valid until the completion of DoVerb, it can be destroyed immediately upon the call's return.
You can make nonmodal verbs act as modal verbs by pointing lpViewContext to a view context implementation that returns the VCSTATUS_MODAL flag from its GetViewStatus method.
For more information about verbs in MAPI, see Form Verbs. For more information about how verbs are handled in OLE, see the OLE Programmer's Reference.
IMAPIForm::SetViewContext, IMAPIViewContext::GetViewStatus