Export (0) Print
Expand All
Expand Minimize

SetLayout (Windows CE 5.0)

Windows CE 5.0
Send Feedback

This function changes the layout of a device context (DC).

DWORD SetLayout(
  HDC hdc,
  DWORD dwLayout,
);

Parameters

hdc
[in] Handle to the DC.
dwLayout
[in] Specifies the DC layout. This parameter can be a combination of one or more of the following flags.
FlagDescription
LAYOUT_BITMAPORIENTATIONPRESERVEDNot supported.
LAYOUT_RTLSets the default horizontal layout to be right-to-left.

If the layout of your DC is currently right-to-left and you want to change it to left-to-right, set dwLayout to 0x00.

Return Values

If the function succeeds, it returns the previous layout of the DC. A return value of 0 indicates a left-to-right layout.

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

Remarks

The layout specifies the order in which text and graphics are revealed in a window or a device context. The default is left-to-right. The SetLayout function changes this to be right-to-left, which is the standard layout in Arabic and Hebrew cultures.

The SetLayout function cannot modify drawing directly into the bits of a DIB.

After the LAYOUT_RTL flag is selected, flags that normally specify right or left are reversed. To avoid confusion, consider defining alternate words for standard flags, such as those in the following table.

Standard flagSuggested alternate name
WS_EX_RIGHTWS_EX_TRAILING
WS_EX_RTLREADINGWS_EX_REVERSEREADING
WS_EX_LEFTSCROLLBARWS_EX_LEADSCROLLBAR
ES_LEFTES_LEAD
ES_RIGHTES_TRAIL
EC_LEFTMARGINEC_LEADMARGIN
EC_RIGHTMARGINEC_TRAILMARGIN

Requirements

OS Versions: Windows CE 5.0 and later.
Header: Windows.h.
Link Library: Coredll.lib.

See Also

GDI Functions | GetLayout


Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Show:
© 2015 Microsoft