Share via


IMAPIControl::GetState

Applies to: Office 2010 | Outlook 2010 | Visual Studio

Retrieves a value that indicates whether the button control is enabled or disabled.

HRESULT GetState(
  ULONG ulFlags,
  ULONG FAR * lpulState
);

Parameters

  • ulFlags
    [in] Reserved; must be zero.

  • lpulState
    [out] A pointer to a value that indicates the state of the button control. One of the following values can be returned:

    • MAPI_DISABLED
      The button control is disabled and cannot be clicked.

    • MAPI_ENABLED
      The button control is enabled and can be clicked.

Return Value

  • S_OK
    The state of the button control was successfully retrieved.

Remarks

Service providers implement the IMAPIControl::GetState method to provide MAPI with the state of a button control. If the button is enabled, it can respond to a mouse click or key press. If it is disabled, the button appears dimmed and does not respond to a mouse click or key press.

For more information about how to implement GetState and the other IMAPIControl : IUnknown methods, see Control Object Implementation.

See Also

Reference

IMAPIControl::Activate

IMAPIControl : IUnknown