Anybody know how this could be done as a CListCtrl? I need a two column list control where the first column contains a number (code) and the right column contains a description of that code that will often times be multi-lined. It would be great if it could wordwrap getting:
2 This is a description that is taking up too
much space so I'll have to word wrap.
15 Short description.
I implemented this in my program and it works great except for one thing. It appears that if I add about 7-8 entries out of a database (basically just text fields, same as if I called AddEntry() 8 times) it has problems drawing the data unless I scroll down and then back up a few times, then all the data shows. Have you had this problem at all? Do you have any idea why this would be occurring? The data is there and I am using no colors for backdrops and none of the entries are selected. For some reason, it just doesn't draw all the text until I scroll around a bit. Any ideas?
I have down loaded this application and it is working fine.
I used your class in my application also That also working fine.
But the problem is when I mapped message on List box but it is not responsing. I want to map
onselectionchange massage to be mapped.
Pl. any solution for the same?
I tried to do the same multi-line listbox implementing a horizontal scroll bar. I could get the horizontal
scroll bar working by setting the window origin of the listbox depending on the scroll position. For some
reason that I didn't have time to look into the scroll bar clashed with using the arrow keyboard keys and
caused an endless message loop of redraws. I imagine that the problem is due to the device context passed as
part of the LPDRAWITEMSTRUCT only refering to a particular item in the list box and not for the whole listbox
viewable area. Therefore shifting the window origin will only work for the item's region of the listbox and
not the other items with undesiriable results. It would be nice to know a suitable work around for this