IMAPIViewContext::GetViewStatus
The IMAPIViewContext::GetViewStatus
method retrieves the current viewer status.
Quick Info
See IMAPIViewContext
: IUnknown.
HRESULT GetViewStatus(
|
ULONG FAR * lpulStatus |
|
|
) |
|
Parameter
lpulStatus
[out] Pointer
to a returned bitmask of flags giving information on view status is stored. The
following flags can be set:
VCSTATUS_READONLY
The form is
to be opened in read-only mode.
VCSTATUS_INTERACTIVE
The form
should suppress displaying user interface even in response to a verb that usually
causes user interface to be displayed.
VCSTATUS_MODAL
The form is
modal to the viewer.
VCSTATUS_NEXT
There is a
next form.
VCSTATUS_PREV
There is a
previous form.
Return Value
S_OK
The call
succeeded and has returned the expected value or values.
Remarks
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 in the lpulStatus parameter is used to determine whether the
VCSTATUS_NEXT and VCSTATUS_PREVIOUS 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 not valid for the context. The lpulStatus
values are dynamic and can be changed if the view context calls the 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.
For
information about implementing the interfaces related to form servers, see MAPI
Form Interfaces Used by Client Applications.
See Also