After being a silent observer for a while I've decided to ask for your help. It seems to me like I've search all the forums in the world for answers and couldn't find...
I consider myself a newbie in win32, so the fact I couldn't find the answer doesn't say anything about the problem being complex .
My task is pretty simple - I'm writing a dll to be used with nsis (Nullsoft Scriptable Install System). I want to change the color of specific subitems in a listview.
I suspect that I'm not getting notifications for the items at all, but only for the titles: let's say I have 4 colums and 10 rows (that is 10 items with 4 subitems each). In the handler I get CDDS_PREPAINT and return CDRF_NOTIFYITEMDRAW then I get 4 CDDS_ITEMPREPAINTs and for each one of them I return CDRF_NOTIFYSUBITEMDRAW, and that's it.
I also noticed that if instead of returning CDRF_NOTIFYSUBITEMDRAW I change the font and return CDRF_NEWFONT, also nothing is happening (and according to MSDN this should affect all subitems of the item).
here is the code: http://www.mediafire.com/?pd6tf3p1r269d84
it's a pack that contains also an nsis file that uses the dll, you need nsis compiler to use it. It also contains an example2.exe which is compiled with a dll in debug mode, so you can attach to it and see the notifications, and hopefully see where is the bug in my code.
Bookmarks