How to use VisualStyleRenderer in Windows 7?

Posted by Paulo Santos on Stack Overflow See other posts from Stack Overflow or by Paulo Santos
Published on 2010-03-06T22:54:45Z Indexed on 2010/03/13 13:45 UTC
Read the original article Hit count: 531

In a small project of mine I've came across the need of a collapsible group box.

Searching the Net, I've found one here. In one of the comments there's an improvement on the original code that uses the VisualStyleRenderer class in order to acquire the TreeView open and closed glyph.

Running the code it draws properly the Plus and Minus sing as Windows XP would draw it, however in Windows Vista and Windows 7 the glyph for open and closed nodes are small triangles.

What kind of interface, class or PInvoke, I need to use in order to acquire the right glyph?

© Stack Overflow or respective owner

Related posts about user-interface

Related posts about windows-7