Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to catch a CListCtrl column width change event?

Tags:

c++

mfc

clistctrl

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.

like image 461
Jaywalker Avatar asked Feb 03 '26 11:02

Jaywalker


1 Answers

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.

like image 116
Bart Gijssens Avatar answered Feb 05 '26 02:02

Bart Gijssens



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!