Skip to content

Instantly share code, notes, and snippets.

@peterooch
Created October 14, 2018 08:51
Show Gist options
  • Save peterooch/5e443168af19252036a5b541a4767497 to your computer and use it in GitHub Desktop.
Save peterooch/5e443168af19252036a5b541a4767497 to your computer and use it in GitHub Desktop.
base/setup/welcome/welcome.c | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/base/setup/welcome/welcome.c b/base/setup/welcome/welcome.c
index 921588bb26..f797a6b539 100644
--- a/base/setup/welcome/welcome.c
+++ b/base/setup/welcome/welcome.c
@@ -765,6 +765,7 @@ _tWinMain(HINSTANCE hInst,
HMENU hSystemMenu;
DWORD dwStyle = WS_OVERLAPPED | WS_CLIPCHILDREN | WS_CLIPSIBLINGS |
WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;
+ DWORD dwLayout;
BITMAP BitmapInfo;
ULONG ulInnerWidth = TITLE_WIDTH;
@@ -867,18 +868,21 @@ _tWinMain(HINSTANCE hInst,
/* Load the configuration and the resources */
LoadConfiguration();
+ GetProcessDefaultLayout(&dwLayout);
+
/* Create main window */
- hWndMain = CreateWindow(szWindowClass,
- szAppTitle,
- dwStyle,
- xPos,
- yPos,
- xWidth,
- yHeight,
- 0,
- 0,
- hInstance,
- NULL);
+ hWndMain = CreateWindowExW((dwLayout == LAYOUT_RTL) ? WS_EX_LAYOUTRTL : 0L,
+ szWindowClass,
+ szAppTitle,
+ dwStyle,
+ xPos,
+ yPos,
+ xWidth,
+ yHeight,
+ 0,
+ 0,
+ hInstance,
+ NULL);
hSystemMenu = GetSystemMenu(hWndMain, FALSE);
if (hSystemMenu)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment