Platform SDK: MAPI |
The IMAPIViewContext::GetViewStatus method retrieves the current viewer status.
See IMAPIViewContext : IUnknown.
HRESULT GetViewStatus( ULONG FAR * lpulStatus );
Form objects call the IMAPIViewContext::GetViewStatus method to determine whether there are more messages to be activated in a form view in either or both directions — that is, in the direction in which a Next command activates messages, in the direction in which a Previous command activates messages, or in both directions. The value pointed to by the lpulStatus parameter is used to determine whether the VCSTATUS_NEXT and VCSTATUS_PREV flags are valid for IMAPIViewContext::ActivateNext. If the VCSTATUS_DELETE flag is set, but not the VCSTATUS_READONLY flag, then the message can be deleted using the IMAPIMessageSite::DeleteMessage method.
Typically, forms disable menu commands and buttons if they are not valid for the viewer's context. A viewer can alert a form to a change in status by calling its IMAPIFormAdviseSink::OnChange method.
The VCSTATUS_MODAL flag is set if the form must be modal to the window whose handle is passed in the earlier IMAPIForm::DoVerb call. If VCSTATUS_MODAL is set, the form can use the thread on which the DoVerb call was made until the form closes. If VCSTATUS_MODAL is not set, the form should not be modal to this window and must not use the thread.