GetDisplayAutoRotationPreferences function
Gets the orientation preferences of the display.
Syntax
BOOL WINAPI GetDisplayAutoRotationPreferences(
_Out_ ORIENTATION_PREFERENCE *pOrientation
);
Parameters
pOrientation [out]
Type: ORIENTATION_PREFERENCE*A pointer to a variable that receives a combination of ORIENTATION_PREFERENCE-typed values that are combined by using a bitwise OR operation. The resulting value specifies the orientation preferences of the display. Here are possible values:
Value Meaning ORIENTATION_PREFERENCE_NONE 0x0 No display orientation is specified.
ORIENTATION_PREFERENCE_LANDSCAPE 0x1 Specifies that the display can be oriented in landscape mode where the width of the display viewing area is greater than the height.
ORIENTATION_PREFERENCE_PORTRAIT 0x2 Specifies that the display can be oriented in portrait mode where the height of the display viewing area is greater than the width.
ORIENTATION_PREFERENCE_LANDSCAPE_FLIPPED 0x4 Specifies that the display can be oriented in flipped landscape mode where the width of the display viewing area is greater than the height. This landscape mode is flipped 180 degrees from ORIENTATION_PREFERENCE_LANDSCAPE mode.
ORIENTATION_PREFERENCE_PORTRAIT_FLIPPED 0x8 Specifies that the display can be oriented in flipped portrait mode where the height of the display viewing area is greater than the width. This portrait mode is flipped 180 degrees from the ORIENTATION_PREFERENCE_PORTRAIT mode.
Return value
Type: BOOL
If this function successfully retrieved the orientation preferences, the return value is nonzero.
If the orientation preferences couldn't be retrieved, the return value is zero.
Requirements
Minimum supported client |
Windows 8 [desktop apps only] |
Minimum supported server |
Windows Server 2012 [desktop apps only] |
Header |
Winuser.h (include Windows.h) |
Library |
User32.lib |
DLL |
User32.dll |