Originally Posted By: NaquadaServ
I tried that, yet Khaled code is drawn as well (slightly offset horizontally), I think because he is modifying the treeview control's WM_PAINT message directly, instead of using custom draw. I've test my custom drawing code with an unaltered treeview control and it works great.


I've managed to take over the drawing of treebar items from mIRC by subclassing the mIRC_Treebar window & the child treeview control.
Then having the NM_CUSTOMDRAW notification sent to the treeviews parent (mIRC_TreeBar) return CDRF_DODEFAULT & the WM_ERASEBKGND message sent to the treeview control itself return FALSE

The normal treeview commands then work fine for changing the controls appearance (icons, colours, etc...)

The problem i'm left with is how to tell which type of window a given item refers too when trying to decide which icon to draw as all items have icon zero set.