CMFCHeaderCtrl Class
The CMFCHeaderCtrl class supports sorting multiple columns in a header control.
class CMFCHeaderCtrl : public CHeaderCtrl
Members
Public Constructors
Name |
Description |
---|---|
Constructs a CMFCHeaderCtrl object. |
|
CMFCHeaderCtrl::~CMFCHeaderCtrl |
Destructor. |
Public Methods
Name |
Description |
---|---|
Enables or disables multiple column sort mode for the current header control. |
|
Indicates whether a column is not sorted, or is sorted in ascending or descending order. |
|
Retrieves the zero-based index of the first sorted column in the header control. |
|
CMFCHeaderCtrl::GetThisClass |
Used by the framework to obtain a pointer to the CRuntimeClass object that is associated with this class type. |
Indicates whether any column in the header control is sorted in ascending order. |
|
Indicates whether the parent window of the current header control is a dialog box. |
|
Indicates whether the current header control is in multiple column sort mode. |
|
Removes the specified column from the list of sort columns. |
|
Sets the sort order of a specified column in a header control. |
Protected Methods
Name |
Description |
---|---|
Called by the framework to draw a header control column. |
|
Called by the framework to draw the sort arrow. |
|
Called by the framework to fill the background of a header control column. |
Example
The following example demonstrates how to construct an object of the CMFCHeaderCtrl class, and how to enable multiple column sort mode for the current header control.
CMFCHeaderCtrl* headerCtrl = new CMFCHeaderCtrl();
headerCtrl->EnableMultipleSort();
Remarks
The CMFCHeaderCtrl class draws a sort arrow on a header control column to indicate that the column is sorted. Use multiple column sort mode if a set of columns in the parent list control (CMFCListCtrl Class) can be sorted at the same time.
Inheritance Hierarchy
Requirements
Header: afxheaderctrl.h