Can anyone tell me how I can have multiline text in the CHeaderCtrl of a ListView window?
Printable View
Can anyone tell me how I can have multiline text in the CHeaderCtrl of a ListView window?
Hi Andrew,
I was wondering if you had found a solution to having a multiline CHeaderCtrl. I have part of a solution, well I can get multiple lines in the header control,
but the CListCtrl does not reconize that the header is bigger so the contents of the list are drawn on the header.
What I did to get multiple lines in the header was to create my own CHeaderCtrl, then subclass the CListCtrl's header. I then handle the WM_ONPAINT
to draw the multilines. However I get the problem above.
Anyway if you have a solution or want to swap notes, email me at
[email protected]
Dan Ramage
1) you have to subclass and to ownerdraw the header control
2) you have to set a font twice the height of the font you plan to use when you create the
header control, and then use the font at normal height with CR/LF in it
HTH
Sally