Share via


CHeaderCtrl Class

Provides the functionality of the Windows common header control.

class CHeaderCtrl : public CWnd

Members

Public Constructors

Name

Description

CHeaderCtrl::CHeaderCtrl

Constructs a CHeaderCtrl object.

Public Methods

Name

Description

CHeaderCtrl::ClearAllFilters

Clears all filters for a header control.

CHeaderCtrl::ClearFilter

Clears the filter for a header control.

CHeaderCtrl::Create

Creates a header control and attaches it to a CHeaderCtrl object.

CHeaderCtrl::CreateDragImage

Creates a transparent version of an item's image within a header control.

CHeaderCtrl::CreateEx

Creates a header control with the specified Windows extended styles and attaches it to a CListCtrl object.

CHeaderCtrl::DeleteItem

Deletes an item from a header control.

CHeaderCtrl::DrawItem

Draws the specified item of a header control.

CHeaderCtrl::EditFilter

Starts editing the specified filter of a header control.

CHeaderCtrl::GetBitmapMargin

Retrieves the width of the margin of a bitmap in a header control.

CHeaderCtrl::GetFocusedItem

Gets the identifier of the item in the current header control that has the focus.

CHeaderCtrl::GetImageList

Retrieves the handle of an image list used for drawing header items in a header control.

CHeaderCtrl::GetItem

Retrieves information about an item in a header control.

CHeaderCtrl::GetItemCount

Retrieves a count of the items in a header control.

CHeaderCtrl::GetItemDropDownRect

Gets the bounding rectangle information for the specified drop-down button in a header control.

CHeaderCtrl::GetItemRect

Retrieves the bounding rectangle for a given item in a header control.

CHeaderCtrl::GetOrderArray

Retrieves the left-to-right order of items in a header control.

CHeaderCtrl::GetOverflowRect

Gets the bounding rectangle of the overflow button for the current header control.

CHeaderCtrl::HitTest

Determines which header item, if any, is located at a specified point.

CHeaderCtrl::InsertItem

Inserts a new item into a header control.

CHeaderCtrl::Layout

Retrieves the size and position of a header control within a given rectangle.

CHeaderCtrl::OrderToIndex

Retrieves the index value for an item based on its order in the header control.

CHeaderCtrl::SetBitmapMargin

Sets the width of the margin of a bitmap in a header control.

CHeaderCtrl::SetFilterChangeTimeout

Sets the timeout interval between the time a change takes place in the filter attributes and the posting of an HDN_FILTERCHANGE notification.

CHeaderCtrl::SetFocusedItem

Sets the focus to a specified header item in the current header control.

CHeaderCtrl::SetHotDivider

Changes the divider between header items to indicate a manual drag and drop of a header item.

CHeaderCtrl::SetImageList

Assigns an image list to a header control.

CHeaderCtrl::SetItem

Sets the attributes of the specified item in a header control.

CHeaderCtrl::SetOrderArray

Sets the left-to-right order of items in a header control.

Remarks

A header control is a window that is usually positioned above a set of columns of text or numbers. It contains a title for each column, and it can be divided into parts. The user can drag the dividers that separate the parts to set the width of each column. For an illustration of a header control, see Header Controls.

This control (and therefore the CHeaderCtrl class) is available only to programs that run under Windows 95/98 and Windows NT version 3.51 and later.

Functionality added for Windows 95/Internet Explorer 4.0 common controls includes the following:

  • Header item custom ordering.

  • Header item drag and drop, for reordering of header items. Use the HDS_DRAGDROP style when you create the CHeaderCtrl object.

  • Header column text constantly viewable during column resizing. Use the HDS_FULLDRAG style when you create a CHeaderCtrl object.

  • Header hot tracking, which highlights the header item when the pointer is hovering over it. Use the HDS_HOTTRACK style when you create the CHeaderCtrl object.

  • Image list support. Header items can contain images stored in a CImageList object or text.

For more information about using CHeaderCtrl, see Controls and Using CHeaderCtrl.

Inheritance Hierarchy

CObject

CCmdTarget

CWnd

CHeaderCtrl

Requirements

Header: afxcmn.h

See Also

Reference

CWnd Class

Hierarchy Chart

CTabCtrl Class

CListCtrl Class

CImageList Class