mfc - How to get my CMFCPropertyGridCtrl to use the "square with +-" for toggling sections instead of &quo

admin2025-04-16  4

In my test dialog I have a CTreeCtrl and a CMFCPropertyGridCtrl:

When I run these controls in dark mode they look like this:

The CTreeCtrl still has the expandable icons as a square with +/-. But the CMFCPropertyGridCtrl is now using a v down symbol. IN other MFC applications I still have the square. I can't find a setting for this.

I saw this mentioned on a webpage but it doesn't appear to be valid (might be be the right type of control):

When you change the TreeButtonStyle of the property grid to TreeView, the expand collapse image reverts to the default Office2010Silver skin style.

Side-point, if I use:

// This causes the tree control to use down arrows (but no dark mode support)
SetWindowTheme(m_treeCtrl.GetSafeHwnd(), L"Explorer", nullptr);

It causes the tree control to use the same arrow style:

Removing that line returns back to the square symbol. No I can't woprk out how to change the property grid control.

In my test dialog I have a CTreeCtrl and a CMFCPropertyGridCtrl:

When I run these controls in dark mode they look like this:

The CTreeCtrl still has the expandable icons as a square with +/-. But the CMFCPropertyGridCtrl is now using a v down symbol. IN other MFC applications I still have the square. I can't find a setting for this.

I saw this mentioned on a webpage but it doesn't appear to be valid (might be be the right type of control):

When you change the TreeButtonStyle of the property grid to TreeView, the expand collapse image reverts to the default Office2010Silver skin style.

Side-point, if I use:

// This causes the tree control to use down arrows (but no dark mode support)
SetWindowTheme(m_treeCtrl.GetSafeHwnd(), L"Explorer", nullptr);

It causes the tree control to use the same arrow style:

Removing that line returns back to the square symbol. No I can't woprk out how to change the property grid control.

Share Improve this question edited Feb 2 at 17:07 Andrew Truckle asked Feb 2 at 16:50 Andrew TruckleAndrew Truckle 19.3k17 gold badges85 silver badges220 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

This is only a partial answer because it fixes this issue, and causes another

转载请注明原文地址:http://anycun.com/QandA/1744793590a87706.html