The Header Control

CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.


When the list view control is in the report it usually
displays a header control to label the columns. Often times we need to
get hold of the header control. This header control is a child window of
the list view control and always has the ID 0.

CHeaderCtrl* pHeader =(CHeaderCtrl*)m_listctrl.GetDlgItem(0);

The header control exists even if the list view is not in the report mode.
When the list view mode is other that the LVS_REPORT, the dimensions of
the header control is zero.

 

Comments:

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read