Jaywalker
Jaywalker

Reputation: 3119

How to catch a CListCtrl column width change event?

How can I catch CListCtrl column width change event in MFC? I believe there should be an OnNotify() event but I am note sure about various values and the parameters to use for message map and the event itself.

Please note that a CListCtrl column width can change by dragging the column divider or by double clicking on the header row.

Upvotes: 3

Views: 5217

Answers (1)

Bart Gijssens
Bart Gijssens

Reputation: 1612

I think the key is to understand that there is a difference in the listcontrol itself, and the header control. By using the GetHeaderCtrl() member function of the listcontrol you can get to the header control. For working with the header control, see this article: http://www.codeproject.com/KB/list/headerctrl.aspx?display=Mobile#Anchor-Handlin-41471 Hope this helps.

Upvotes: 3

Related Questions