How to make group field text disabled when group field is disabled?

I ran into a problem with group text. I disabled the group package by calling EnableWindow (FALSE). The problem is that the group header does not turn gray.

Can someone please tell me why this is happening and how to get rid of this problem.

+6
source share
1 answer

This seems to be a bug in comctrl32.dll when visual styles are enabled.

I made a very simple program that displays a dialog with the group field turned on and off. Without visual styles, a disabled group block is inactive, but with visual styles this is not the case:

Dialog without visual styles:

Without visual styles

The same dialog using visual styles:

With visual styles

Both Windows 7 and Windows XP suffer from the same problem, I did not check Windows 8. I am afraid that we must put up with this. The only way is to draw a group box yourself.

+4
source

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


All Articles