How to switch off Show Always for a CMFCPropertyGridCtrl (or change the colour)?

ChuckieAJ 241 Reputation points
2025-02-21T16:47:57.1233333+00:00

I confess that I have also asked the same question on StackOverflow, but it has not had any responses.

  • CListCtrl lets you switch off Show Always by using LVS_SHOWSELALWAYS.
  • CTreeCtrl also lets you switch off Show Always by using TVS_SHOWSELALWAYS.

But I can't seem to find an equivalent for the CMFCPropertyGridCtrl. This is not an issue when I am using the default light theme:

enter image description here

As you can see, the selected property is left in a light grey when you tab to another control on the dialog. But, this is what it looks like for my dark theme:

enter image description here

Not good. So I hoping to either:

  1. Switch off Show Always for the property grid control or
  2. Change the colour it uses. What's frustrating is that in Visual Studio the property that was focused has a different colour:

User's image

That is what I would like to achieve. Possible?

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,861 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.