1 Jan 2003 14:21
CustomDrawn TreeView
Hello Wtl, I'm doing a custom drawn tree view control. I use both CDDS_ITEMPREPAINT and CDDS_ITEMPOSTPAINT. During CDDS_ITEMPREPAINT, I just change the font(sometimes), textcolor and text backcolor and return ( CDRF_NOTIFYPOSTPAINT | CDRF_NEWFONT ). During CDDS_ITEMPOSTPAINT, I change the default (+) icon that windows draw and replace it with a custom icon. I also do some drawing around the item rect. So far so good. But, when I call DeleteAllItem() and repopulate the tree, the item's text does not show up. All other things appear fine including the backcolor, the icon that i paint and the drawing around the item rect. They reappear when I resize the dialog. I've tried using Invalidate() and UpdateWindow() but this does not seem to help. It seems to be related to the call to DeleteAllItem() because if I don't call this things work as expected. But I can't live with not deleting the items. Any clues anyone? Thanks for all you help Manish _________________________________________________________________ MSN 8: advanced junk mail protection and 2 months FREE*. http://join.msn.com/?page=features/junkmail
RSS Feed