I’m trying to implement state images on my treeview; I’d like to have my own images on the buttons instead of the default + and -.
I’ve got an image showing, but it doesn’t change when I expand the node – apparently I need to explicitly update the state image when the treeview’s state changes.
Which message do I capture (in the main window procedure) to make this happen? TVM_EXPAND doesn’t seem to work, and various discussions online recommend strange things like hit testing a mouse click or something weird like that.
Alternatively, if there’s a whizbang tutorial or something on this, please post it – I’m working off pure MSDN (ugh) and this for the most part…
Via a
WM_NOTIFYmessage, you’ll getTVN_ITEMEXPANDINGwhen an expand button is clicked andTVN_ITEMEXPANDEDwhen the item actually expands/collapses.