Creating the Header Control
The header control is not directly available in the dialog editor (although you can add a list control, which includes a header control). ClassWizard doesn't support adding data members of type CHeaderCtrl.
To put a header control in a dialog box
Manually embed a member variable of type in your dialog class.
In , create and set the styles for the CHeaderCtrl, position it, and display it.
Add items to the header control.
Use ClassWizard to map handler functions in the dialog class for any header-control notification messages you need to handle.
To put a header control in a view (not a CListView)
Style, position, and display the header control window in the view's member function.
Add items to the header control.
Use ClassWizard to map handler functions in the view class for any header-control notification messages you need to handle.
In either case, the embedded control object is created when the view or dialog object is created. Then you must call to create the control window. To position the control, call to determine the control's initial size and position and to set the position you want. Then add items as described in Adding Items to the Header Control.