Expand Minimize

SetProcessDefaultLayout function

Changes the default layout when windows are created with no parent or owner only for the currently running process.

Syntax


BOOL WINAPI SetProcessDefaultLayout(
  _In_  DWORD dwDefaultLayout
);

Parameters

dwDefaultLayout [in]

Type: DWORD

The default process layout. This parameter can be 0 or the following value.

ValueMeaning
LAYOUT_RTL
0x00000001

Sets the default horizontal layout to be right to left.

 

Return value

Type:

Type: BOOL

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

The layout specifies how text and graphics are laid out; the default is left to right. The SetProcessDefaultLayout function changes layout to be right to left, which is the standard in Arabic and Hebrew cultures.

After the LAYOUT_RTL flag is selected, flags normally specifying 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

 

If using this function with a mirrored window, note that the SetProcessDefaultLayout function does not mirror the whole process and all the device contexts (DCs) created in it. It mirrors only the mirrored window's DCs. To mirror any DC, use the SetLayout function.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

See also

Reference
GetProcessDefaultLayout
Conceptual
Windows
Other Resources
SetLayout

 

 

Community Additions

ADD
Show:
© 2014 Microsoft