listbox custom draw
-
Hi, I have a custom draw list box, I handle WM_DRAWITEM to draw the items but it seems that only the selected items are drawn. The others aren't being invalidated. Anyone know why? cheers, roel
Are you checking the item state and setting TextColor correctly? (DRAWITEMSTRUCT::itemState) That's just a guess, without code it's hard to tell what's going wrong. Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke
-
Are you checking the item state and setting TextColor correctly? (DRAWITEMSTRUCT::itemState) That's just a guess, without code it's hard to tell what's going wrong. Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke
Thanks for your reply, after letting it rest and getting some sleep it only took me 10 minutes to find it ;) Problem was that I was using WTL's CDC and not CDCHandle, CDC destroys the DC when it goes out of scope... Argh stupid me, I've made this mistakes dozens of times for fonts and cursors and bitmaps, just when I thought that I wouldn't make it again this shows up... Anyway thanks for your answer.