Why are icons in property sheets showing so many colors?

I am creating a file properties shell extension and want to have a small icon to move the properties tab from the standard system tabs. Unfortunately, my icon is almost completely grayed out.

Original Image:

In the properties sheet tab:

At first I thought it was somehow my problem, but then I saw that TortoiseSVN seems to have the same problem:

This happens on both Windows 7 and Windows 8.

Does anyone know why these images seem so muffled? Also, does anyone have any hints on how to make the icon look good, despite this colorlessness?

+4
source share
2 answers

The PropertySheet function initializes its tab control with a 16-liter (ILC_COLOR) ImageList and copies the icon specified in it for each page. There seems to be no way to override this and provide your own ImageList (or specify the bit depth of the created ImageList). Presumably this is a legacy of the Windows 95 source code, which has never been updated as it moves.

+4
source

Instead of property sheets, you can use Tab Control, which makes managing tabs more flexible and straightforward. And of course, you can use any type of icon, because you need to create your own ImageList.

Here you can read about tab controls:

http://msdn.microsoft.com/en-us/library/windows/desktop/bb760548(v=vs.85).aspx

And here you can access the example of using Tab controls:

Icons on Win32 Property Pages Are Ugly - 4-Bit Icons

0
source

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


All Articles