Aren't those images usually in Windows Vista and Windows 7? The tree control should get them automatically on those systems when you have themes enabled.
The easy way to get something close to that is to just set the ButtonStyle
property to bsTriangle
. It won't be exactly the images shown in the question, though. The "minus" arrow will point straight down instead of diagonally, and the "plus" arrow will be solid instead of an outline.
You can provide your own bitmap. Change the VT_XPBUTTONMINUS and VT_XPBUTTONPLUS resources to whatever images you want, and set the ButtonFillMode
property to fmShaded
.
I see no facility for changing the image based on the bi-di mode, though. You can create a descendant class that overrides PaintNodeButton
, and then paint whatever you want. Copy the placement code from the parent class.