CMFCHeaderCtrl Class
TOC
Collapse the table of content
Expand the table of content

CMFCHeaderCtrl Class

 

The CMFCHeaderCtrl class supports sorting multiple columns in a header control.

class CMFCHeaderCtrl : public CHeaderCtrl

Name

Description

CMFCHeaderCtrl::CMFCHeaderCtrl

Constructs a CMFCHeaderCtrl object.

CMFCHeaderCtrl::~CMFCHeaderCtrl

Destructor.

Name

Description

CMFCHeaderCtrl::EnableMultipleSort

Enables or disables multiple column sort mode for the current header control.

CMFCHeaderCtrl::GetColumnState

Indicates whether a column is not sorted, or is sorted in ascending or descending order.

CMFCHeaderCtrl::GetSortColumn

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.

CMFCHeaderCtrl::IsAscending

Indicates whether any column in the header control is sorted in ascending order.

CMFCHeaderCtrl::IsDialogControl

Indicates whether the parent window of the current header control is a dialog box.

CMFCHeaderCtrl::IsMultipleSort

Indicates whether the current header control is in multiple column sort mode.

CMFCHeaderCtrl::RemoveSortColumn

Removes the specified column from the list of sort columns.

CMFCHeaderCtrl::SetSortColumn

Sets the sort order of a specified column in a header control.

Name

Description

CMFCHeaderCtrl::OnDrawItem

Called by the framework to draw a header control column.

CMFCHeaderCtrl::OnDrawSortArrow

Called by the framework to draw the sort arrow.

CMFCHeaderCtrl::OnFillBackground

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();

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.

CObject

   CCmdTarget

      CWnd

         CHeaderCtrl

            CMFCHeaderCtrl

Requirements

Header: afxheaderctrl.h

Show:
© 2016 Microsoft