GetAutoRotationState function

Retrieves an AR_STATE value containing the state of screen auto-rotation for the system, for example whether auto-rotation is supported, and whether it is enabled by the user. GetAutoRotationState provides a robust and diverse way of querying for auto-rotation state, and more. For example, if you want your app to behave differently when multiple monitors are attached then you can determine that from the AR_STATE returned.

Syntax

BOOL GetAutoRotationState(
  PAR_STATE pState
);

Parameters

pState

Pointer to a location in memory that will receive the current state of auto-rotation for the system.

Return Value

TRUE if the method succeeds, otherwise FALSE.

See GetDisplayAutoRotationPreferences for an example of using this function.

Requirements

   
Target Platform Windows
Header winuser.h
DLL Kernel.dll