I made listview with column styles. It works ok but I am trying to color files of different kinds different colors. for example directories a different color than files. Problem is when I send LVM_SETTEXTCOLOR whole column changes color not just the item that I want.

Anybody with any clues or examples would be very helpful.

best regards,

Posted on 2001-09-06 00:00:14 by czDrillard

I have recently had to find how to do this for a tree control, it is possible, but you need to use NM_CUSTOMDRAW

this message comes through to the parent window via WM_NOTIFY, the lParam of the message will be the address of a NMLVCUSTOMDRAW structure.

Using this you can determine individual drawing characteristics for each item in the list. the documentation is too large to repeat here, so take a look on the MS website.

Posted on 2001-09-06 04:56:03 by umbongo
Thanx, umbongo, I will start investigating NM_CUSTOMDRAW message now. and will let you know my results.
Posted on 2001-09-06 23:22:29 by czDrillard