IMAPIForm::SetViewContext

The IMAPIForm::SetViewContext method establishes a view context for the form.

Quick Info

See IMAPIForm : IUnknown.

HRESULT SetViewContext(
  LPMAPIVIEWCONTEXT pViewContext  
);
 

Parameters

pViewContext
[in] Pointer to the new view context for the form.

Return Values

S_OK
The view context was successfully set.

Remarks

Form viewers call the IMAPIForm::SetViewContext method to establish a particular form view context as current. A form can have only one view context at a time.

Notes to Implementers

Most form servers implement SetViewContext using this algorithm:

Depending on the status flags returned from GetViewStatus, SetViewContext can also perform other actions. For example, if the VCSTATUS_NEXT and VCSTATUS_PREV flags are returned, SetViewContext can enable the Next and Previous buttons for the new view context.