Ownerdraw Listview and new Font
I have changed the font in my ownerdraw Listview (created on the fly in MSVC v6 C no ++).
In the WM_DRAWITEM I get a row, do the drawing, then the next row is a seperate message.
I take each columns sub items rect and fill it the correct colour. Then I get the text and test its size to center the text. No problems here.
Trouble is with the height. The new font is bigger, to make the ctrl more readable.
Unfortunately the item rectangle in the DRAWITEM struct is sized for the smaller original font but the HDC has the larger font already selected in.
This means the text will not fit in the items rectangle (and onto the HDC) as it is too high.
This results in only the top of the text being drawn (as the rest will not fit on the HDC).
If I turn the ownerdraw off windows draws the listview with the new font and no colour. So it must be possible.
How do I change each item (or rows) height?
Any other ideas or links to ownerdraw or custom draw stuff.