Woody
2011-07-07 23:29:08 UTC
Working on the same XListCtrl, I now want to change the spacing of
lines in report view from the default.
In VS6 I used the following VBI: the control is created with the style
owner draw fixed, and after OnMeasureItem has been called, and I give
it the desired line spacing, I cleared the owner-draw bit using
ModifyStyle.
The effect of this was that the custom drawing of the control worked,
and the line spacing in report view was the value I had passed in
repsonse to the WM_MEASUREITEM.
In VS2005, the same technique produces a different result. The line
spacing remains the default. If I leave the owner-draw fixed bit
alone, I am expected to provide a DrawItem function, and since I have
not, CListCtrl::DrawItem asserts.
Since the custom draw paradigm doesn't allow for changing in spacing,
how can I combine changing the (constant) spacing of the listview
control's items with the custom drawing?
lines in report view from the default.
In VS6 I used the following VBI: the control is created with the style
owner draw fixed, and after OnMeasureItem has been called, and I give
it the desired line spacing, I cleared the owner-draw bit using
ModifyStyle.
The effect of this was that the custom drawing of the control worked,
and the line spacing in report view was the value I had passed in
repsonse to the WM_MEASUREITEM.
In VS2005, the same technique produces a different result. The line
spacing remains the default. If I leave the owner-draw fixed bit
alone, I am expected to provide a DrawItem function, and since I have
not, CListCtrl::DrawItem asserts.
Since the custom draw paradigm doesn't allow for changing in spacing,
how can I combine changing the (constant) spacing of the listview
control's items with the custom drawing?