Hey everybody, looking for help with a header control.

I've got a header control sitting on top of a listbox (like a ListView) and I want it to scroll horizontally when the list box scrolls. So far, I've got this working by simply *moving* the header when the list box scrolls. But I think there must be a better way.

For example, the list box when scrolled seems to simply have the origin of the client area moved. This would at least seem to be the case because my list box is owner drawn, and doesn't have any scrolling logic in itself, yet everything scrolls fine.

I think the list box must call SetViewportOrg (or similar?) and I'd like to do something similar with the header control. Trouble is, I don't have a DC for the Header Control, and if I make one, I'll have to delete it right away so I don't think that'll help. Actually, I don't know how the List box does this unless it has CS_OWNDC which I doubt...

Anyways, any ideas would be appreciated. I'm going to look into GetDCEx and check if either ListBox or HeaderControl do have CS_OWNDC set...

Thanks

--Chorus
Posted on 2002-11-11 11:14:55 by chorus