Inactive title text color in Windows 10

In Windows 10, how do you get the color of inactive subtitle text?

In the example below, “Untitled - Notepad” is grayed out when the window is inactive:

Notepad of active and inactive window

But the color that I get is black when I try to perform the following functions:

color = GetSysColor(COLOR_INACTIVECAPTIONTEXT); //color = black, wrong HTHEME htheme = OpenThemeData(hwnd, L"WINDOW"); color = GetThemeSysColor(htheme, COLOR_INACTIVECAPTIONTEXT); //color = black, wrong GetThemeColor(htheme, WP_CAPTION, CS_INACTIVE, TMT_TEXTCOLOR, &color); //color = black, wrong 

DrawThemeText and DrawThemeTextEx also print the inactive signature in black.

All these functions work fine in Windows 7 because inactive headers remain the same color, only the Aero glass item changes color. But this is not the same in Windows 10.

+5
source share

Source: https://habr.com/ru/post/1242061/


All Articles