Click to See Complete Forum and Search --> : Q: CListCtrl and the CHeaderCtrl.


Dan Ramage
April 7th, 1999, 12:54 PM
I wanted to change the height of the header control that goes along with my derived CListCtrl which I use in the report mode. I accomplished this by SubClassing the header control and handling the desired new height in OnPaint of the header control. I basically just called SetWindowPos to achieve the height I wanted. The CListCtrl
doesn't seem to know that the CHeaderCtrl is a different height and uses the old height. When I call GetItemRect in the DrawItem of my CListCtrl, it is returning the
rect which is for the original header, I can tell this from the CRect.top member that is returned. I poked through the code for the CListCtrl( the MFC code ) and I don't
see anything that deals with the header. Is there a way to notify the CListCtrl that the header has changed size?
Thanks in advance,

Dan Ramage

DieterHammer
August 2nd, 2001, 03:42 PM
one solution is at http://codeguru.earthweb.com/listview/HeaderCtrlEx.shtml