GetLayout function (wingdi.h)

The GetLayout function returns the layout of a device context (DC).


DWORD GetLayout(
  [in] HDC hdc


[in] hdc

A handle to the device context.

Return value

If the function succeeds, it returns the layout flags for the current device context.

If the function fails, it returns GDI_ERROR. For extended error information, call GetLastError.


The layout specifies the order in which text and graphics are revealed in a window or device context. The default is left to right. The GetLayout function tells you if the default has been changed through a call to SetLayout. For more information, see "Window Layout and Mirroring" in Window Features.


Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wingdi.h (include Windows.h)
Library Gdi32.lib
DLL Gdi32.dll

See also

Device Context Functions

Device Contexts Overview