Click to See Complete Forum and Search --> : CListCtrl : Anchor/Freeze Rows in a list control


Sethi, D
March 30th, 1999, 01:25 PM
Does anyone know how to anchor rows in a list control. I'm trying to show totals in the last visible row in the list control and want to be able to show these rows always.

I'd highly appreciate some sample code.


Thank you,

dharmesh_sethi@rsco.com

Dave Lorde
March 31st, 1999, 07:42 AM
Check out the Listview Control area of this site.


Dave

Sethi, D
March 31st, 1999, 12:03 PM
No obvious articles about anchoring found. Could you pls provide a link to the article.


sethi

Dave Lorde
April 1st, 1999, 02:54 AM
Apologies, I misread your post as wanting to freeze columns, not rows. Sorry, my mistake.


I think you'll have to make your list control owner-drawn, and check for when the last visible row is being drawn in the DrawItem procedure, then draw the frozen row(s) where they are required.


The article on owner draw list controls and the article on 'Selection Highlighting of Entire Row' between them detail how to draw the rows of an owner draw list control.


Dave

Jake Helfert
April 1st, 1999, 03:14 AM
I suggest using the CGridWnd control found on this site. It offers greater control for things like frozen columns. I'm not sure if it does frozen rows. It's a great piece of work.