From: JoDeGr8 on
I am looking for a listbox with items like this
http://img209.imageshack.us/img209/1418/fileitem.jpg

I have created an owner drawn listbox to achieve similar results


I am currently dividing LPDRAWITEMSTRUCT::rcItem into two rectangles
inside the DrawItem.

The first rectangle holds the black text and second rectangle holds
the blue text. This seems pretty ok for the first item. But, from the
second item onwards calculation is going wrong.

I believe LPDRAWITEMSTRUCT::rcItem is calculated for every item added
into listbox.

The code for the same :
http://pastebin.com/m22f1836d


The output of the above code is:

http://img209.imageshack.us/img209/299/image2ys.jpg

As you can see the alignment got changed giving undesirable output.

Please advice on this issue.

Regards,
J.