Forgot to install InitCommonControlsEx() in the Windows code.

This commit is contained in:
Pietro Gagliardi 2015-05-19 12:01:45 -04:00
parent ca697fa533
commit 7fff5b046a
1 changed files with 15 additions and 0 deletions

View File

@ -72,6 +72,14 @@ static BOOL WINAPI consoleCtrlHandler(DWORD dwCtrlType)
uiInitOptions options;
#define wantedICCClasses ( \
ICC_STANDARD_CLASSES | /* user32.dll controls */ \
ICC_PROGRESS_CLASS | /* progress bars */ \
ICC_TAB_CLASSES | /* tabs */ \
ICC_LISTVIEW_CLASSES | /* table headers */ \
ICC_UPDOWN_CLASS | /* spinboxes */ \
0)
const char *uiInit(uiInitOptions *o)
{
STARTUPINFOW si;
@ -79,6 +87,7 @@ const char *uiInit(uiInitOptions *o)
HICON hDefaultIcon;
HCURSOR hDefaultCursor;
NONCLIENTMETRICSW ncm;
INITCOMMONCONTROLSEX icc;
options = *o;
@ -124,6 +133,12 @@ const char *uiInit(uiInitOptions *o)
if (hollowBrush == NULL)
return loadLastError("getting hollow brush");
ZeroMemory(&icc, sizeof (INITCOMMONCONTROLSEX));
icc.dwSize = sizeof (INITCOMMONCONTROLSEX);
icc.dwICC = wantedICCClasses;
if (InitCommonControlsEx(&icc) == 0)
return loadLastError("initializing Common Controls");
return NULL;
}