Stefano Piovesan
Stefano Piovesan

Reputation: 1215

CTreeCtrl with arrows when expanded

Is it possible to set CTreeCtrl styles to show arrows when expanded, like in this image, instead of the usual +/- signs?

enter image description here

Upvotes: 1

Views: 222

Answers (1)

Anders
Anders

Reputation: 101569

Make sure you have ComCtrl v6 in your manifest to enable Visual Styles in your application, then call SetWindowTheme(hWndMyTree, L"Explorer", NULL);

To fully emulate Vista you should also set the TVS_EX_DOUBLEBUFFER and TVS_EX_FADEINOUTEXPANDOS extended styles.

Upvotes: 2

Related Questions