[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.
This commit is contained in:
Bișoc George 2019-03-28 16:09:16 +01:00 committed by Hermès BÉLUSCA - MAÏTO
parent 0197c4f875
commit f8e0b4675f
2 changed files with 7 additions and 0 deletions

View File

@ -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;

View File

@ -14,6 +14,7 @@
#include <stdio.h>
#include <windows.h>
#include <commctrl.h>
#include <debug.h>
#include "main.h"