diff --git a/redo/windows/init.c b/redo/windows/init.c index 69e3ec45..815d75bb 100644 --- a/redo/windows/init.c +++ b/redo/windows/init.c @@ -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; }