Using CHeaderCtrl
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Using CHeaderCtrl.
Use a header control, represented by class CHeaderCtrl, to display column headers for a columnar list. For example, a header control would be useful for implementing column controls in a spreadsheet.
The header control is usually divided into parts, called "header items," each bearing a title for the associated column of text or numbers. Depending on the styles you set, you can provide a number of direct ways for users to manipulate the header items.
Note
CListCtrl provides an embedded header control, and CListView encapsulates CListCtrl
in an MFC class. In general, think of using CHeaderCtrl
to label lists that you intend to draw yourself.