https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f8e0b4675f1293acf6f5b…
commit f8e0b4675f1293acf6f5b5fcddb5083636ee3d12
Author: Bișoc George <fraizeraust99(a)gmail.com>
AuthorDate: Thu Mar 28 16:09:16 2019 +0100
Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org>
CommitDate: Thu Mar 28 19:02:48 2019 +0100
[OSK] Initialize the common controls
On-Screen Keyboard has a manifest which is used for visual styles. However, the common
controls aren't initialized and as a general rule the controls have to be loaded in
the application's handle instance.
---
base/applications/osk/main.c | 6 ++++++
base/applications/osk/osk.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/base/applications/osk/main.c b/base/applications/osk/main.c
index 30e97941140..e12d68dedf0 100644
--- a/base/applications/osk/main.c
+++ b/base/applications/osk/main.c
@@ -587,6 +587,7 @@ int WINAPI wWinMain(HINSTANCE hInstance,
HANDLE hMutex;
DWORD dwError;
INT LayoutResource;
+ INITCOMMONCONTROLSEX iccex;
UNREFERENCED_PARAMETER(prev);
UNREFERENCED_PARAMETER(cmdline);
@@ -615,6 +616,11 @@ int WINAPI wWinMain(HINSTANCE hInstance,
}
}
+ /* Load the common controls */
+ iccex.dwSize = sizeof(INITCOMMONCONTROLSEX);
+ iccex.dwICC = ICC_STANDARD_CLASSES | ICC_WIN95_CLASSES;
+ InitCommonControlsEx(&iccex);
+
ZeroMemory(&Globals, sizeof(Globals));
Globals.hInstance = hInstance;
diff --git a/base/applications/osk/osk.h b/base/applications/osk/osk.h
index 5de39d32115..f320d14c4f4 100644
--- a/base/applications/osk/osk.h
+++ b/base/applications/osk/osk.h
@@ -14,6 +14,7 @@
#include <stdio.h>
#include <windows.h>
+#include <commctrl.h>
#include <debug.h>
#include "main.h"