I'm trying to color UI elements based on the system theme.
In older Windows (what Windows XP called "classic") you could get the window bar color and other colors using the GetSysColor() function. This actually still works as of Windows 10 when theming is disabled (but results in an ugly window).
In modern Windows, the function GetThemeSysColor is supposed to replace it. However, when I call that function, I get the same "classic" colors.
Do you know what I'm doing wrong?
Relevant code:
HTHEME hThemeData = OpenThemeData(hWnd, L"Globals");
if (hThemeData == NULL) return;
COLORREF cActiveTitle = GetThemeSysColor(hThemeData, COLOR_ACTIVECAPTION);
_tprintf(TEXT("COLOR_ACTIVECAPTION = %u\t%u\t%u\n"),
GetRValue(cActiveTitle), GetGValue(cActiveTitle), GetBValue(cActiveTitle));