Rediger

Del via


Header Control

This section contains information about the programming elements used with header controls.

Overviews

Topic Contents
About Header Controls A header control is a window that is usually positioned above columns of text or numbers. It contains a title for each column, and it can be divided into parts.
Using Header Controls This topic gives implementation details and code examples for header controls.

Macros

Topic Contents
Header_ClearAllFilters Clears all of the filters for a given header control. You can use this macro or send the HDM_CLEARFILTER message explicitly.
Header_ClearFilter Clears the filter for a given header control. You can use this macro or send the HDM_CLEARFILTER message explicitly.
Header_CreateDragImage Creates a transparent version of an item image within an existing header control. You can use this macro or send the HDM_CREATEDRAGIMAGE message explicitly.
Header_DeleteItem Deletes an item from a header control. You can use this macro or send the HDM_DELETEITEM message explicitly.
Header_EditFilter Moves the input focus to the edit box when a filter button has the focus.
Header_GetBitmapMargin Gets the width of the margin (in pixels) of a bitmap in an existing header control. You can use this macro or send the HDM_GETBITMAPMARGIN message explicitly.
Header_GetFocusedItem Gets the item in a header control that has the focus. Use this macro or send the HDM_GETFOCUSEDITEM message explicitly.
Header_GetImageList Gets the handle to the image list that has been set for an existing header control. You can use this macro or send the HDM_GETIMAGELIST message explicitly.
Header_GetItem Gets information about an item in a header control. You can use this macro or send the HDM_GETITEM message explicitly.
Header_GetItemCount Gets a count of the items in a header control. You can use this macro or send the HDM_GETITEMCOUNT message explicitly.
Header_GetItemDropDownRect Gets the coordinates of the drop-down button for a specified item in a header control. The header control must be of type HDF_SPLITBUTTON. Use this macro or send the HDM_GETITEMDROPDOWNRECT message explicitly.
Header_GetItemRect Gets the bounding rectangle for a given item in a header control. You can use this macro or send the HDM_GETITEMRECT message explicitly.
Header_GetOrderArray Gets the current left-to-right order of items in a header control. You can use this macro or send the HDM_GETORDERARRAY message explicitly.
Header_GetOverflowRect Gets the coordinates of the drop-down overflow area for a specified header control. The header control must be of type HDF_SPLITBUTTON. Use this macro or send the HDM_GETOVERFLOWRECT message explicitly.
Header_GetStateImageList Gets the handle to the image list that has been set for an existing header control state.
Header_GetUnicodeFormat Gets the Unicode character format flag for the control. You can use this macro or send the HDM_GETUNICODEFORMAT message explicitly.
Header_InsertItem Inserts a new item into a header control. You can use this macro or send the HDM_INSERTITEM message explicitly.
Header_Layout Retrieves the correct size and position of a header control within the parent window. You can use this macro or send the HDM_LAYOUT message explicitly.
Header_OrderToIndex Retrieves an index value for an item based on its order in the header control. You can use this macro or send the HDM_ORDERTOINDEX message explicitly.
Header_SetBitmapMargin Sets the width of the margin for a bitmap in an existing header control. You can use this macro or send the HDM_SETBITMAPMARGIN message explicitly.
Header_SetFilterChangeTimeout Sets the timeout interval between the time a change takes place in the filter attributes and the posting of an HDN_FILTERCHANGE notification. You can use this macro or send the HDM_SETFILTERCHANGETIMEOUT message explicitly.
Header_SetFocusedItem Sets the focus to a specified item in a header control. Use this macro or send the HDM_SETFOCUSEDITEM message explicitly.
Header_SetHotDivider Changes the color of a divider between header items to indicate the destination of an external drag-and-drop operation. You can use this macro or send the HDM_SETHOTDIVIDER message explicitly.
Header_SetImageList Assigns an image list to an existing header control. You can use this macro or send the HDM_SETIMAGELIST message explicitly.
Header_SetItem Sets the attributes of the specified item in a header control. You can use this macro or send the HDM_SETITEM message explicitly.
Header_SetOrderArray Sets the left-to-right order of header items. You can use this macro or send the HDM_SETORDERARRAY message explicitly.
Header_SetStateImageList Assigns an image list to an existing header control state.
Header_SetUnicodeFormat Sets the UNICODE character format flag for the control. This message allows you to change the character set used by the control at run time rather than having to re-create the control. You can use this macro or send the HDM_SETUNICODEFORMAT message explicitly.

Messages

Topic Contents
HDM_CLEARFILTER Clears the filter for a given header control. You can send this message explicitly or use the Header_ClearFilter macro.
HDM_CREATEDRAGIMAGE Creates a semi-transparent version of an item's image for use as a dragging image. You can send this message explicitly or use the Header_CreateDragImage macro.
HDM_DELETEITEM Deletes an item from a header control. You can send this message explicitly or use the Header_DeleteItem macro.
HDM_EDITFILTER Moves the input focus to the edit box when a filter button has the focus.
HDM_GETBITMAPMARGIN Gets the width of the bitmap margin for a header control. You can send this message explicitly or use the Header_GetBitmapMargin macro.
HDM_GETFOCUSEDITEM Gets the item in a header control that has the focus. Send this message explicitly or by using the Header_GetFocusedItem macro. A window receives this message through its WindowProc function.
HDM_GETIMAGELIST Gets the handle to the image list that has been set for an existing header control. You can send this message explicitly or use the Header_GetImageList or Header_GetStateImageList macro.
HDM_GETITEM Gets information about an item in a header control. You can send this message explicitly or use the Header_GetItem macro.
HDM_GETITEMCOUNT Gets a count of the items in a header control. You can send this message explicitly or use the Header_GetItemCount macro.
HDM_GETITEMDROPDOWNRECT Gets the bounding rectangle of the split button for a header item with style HDF_SPLITBUTTON. Send this message explicitly or by using theHeader_GetItemDropDownRectmacro.
HDM_GETITEMRECT Gets the bounding rectangle for a given item in a header control. You can send this message explicitly or use the Header_GetItemRect macro.
HDM_GETORDERARRAY Gets the current left-to-right order of items in a header control. You can send this message explicitly or use the Header_GetOrderArray macro.
HDM_GETOVERFLOWRECT Gets the bounding rectangle of the overflow button when the HDS_OVERFLOW style is set on the header control and the overflow button is visible. Send this message explicitly or by using theHeader_GetOverflowRectmacro.
HDM_GETUNICODEFORMAT Gets the Unicode character format flag for the control. You can send this message explicitly or use the Header_GetUnicodeFormat macro.
HDM_HITTEST Tests a point to determine which header item, if any, is at the specified point.
HDM_INSERTITEM Inserts a new item into a header control. You can send this message explicitly or use the Header_InsertItem macro.
HDM_LAYOUT Retrieves information used to set the size and position of the header control within the target rectangle of the parent window. You can send this message explicitly or use the Header_Layout macro.
HDM_ORDERTOINDEX Retrieves an index value for an item based on its order in the header control. You can send this message explicitly or use the Header_OrderToIndex macro.
HDM_SETBITMAPMARGIN Sets the width of the margin, specified in pixels, of a bitmap in an existing header control. You can send this message explicitly or use the Header_SetBitmapMargin macro.
HDM_SETFILTERCHANGETIMEOUT Sets the timeout interval between the time a change takes place in the filter attributes and the posting of an HDN_FILTERCHANGE notification. You can send this message explicitly or use the Header_SetFilterChangeTimeout macro.
HDM_SETFOCUSEDITEM Sets the focus to a specified item in a header control. Send this message explicitly or by using the Header_SetFocusedItem macro.
HDM_SETHOTDIVIDER Changes the color of a divider between header items to indicate the destination of an external drag-and-drop operation. You can send this message explicitly or use the Header_SetHotDivider macro.
HDM_SETIMAGELIST Assigns an image list to an existing header control. You can send this message explicitly or use the Header_SetImageList or Header_SetStateImageList macro.
HDM_SETITEM Sets the attributes of the specified item in a header control. You can send this message explicitly or use the Header_SetItem macro.
HDM_SETORDERARRAY Sets the left-to-right order of header items. You can send this message explicitly or use the Header_SetOrderArray macro.
HDM_SETUNICODEFORMAT Sets the UNICODE character format flag for the control. This message allows you to change the character set used by the control at run time rather than having to re-create the control. You can send this message explicitly or use the Header_SetUnicodeFormat macro.
HDM_TRANSLATEACCELERATOR Not implemented.

Notifications

Topic Contents
HDN_BEGINDRAG Sent by a header control when a drag operation has begun on one of its items. This notification code is sent only by header controls that are set to the HDS_DRAGDROP style. This notification code is sent in the form of a WM_NOTIFY message.
HDN_BEGINFILTEREDIT Notifies a header control's parent window that a filter edit has begun. This notification code is sent in the form of a WM_NOTIFY message.
HDN_BEGINTRACK Notifies a header control's parent window that the user has begun dragging a divider in the control (that is, the user has pressed the left mouse button while the mouse cursor is on a divider in the header control). This notification code is sent in the form of a WM_NOTIFY message.
HDN_DIVIDERDBLCLICK Notifies a header control's parent window that the user double-clicked the divider area of the control. This notification code is sent in the form of a WM_NOTIFY message.
HDN_DROPDOWN Sent by a header control to its parent when the drop-down arrow on the header control is clicked. This notification code is sent in the form of a WM_NOTIFY message.
HDN_ENDDRAG Sent by a header control when a drag operation has ended on one of its items. This notification code is sent as a WM_NOTIFY message. Only header controls that are set to the HDS_DRAGDROP style send this notification.
HDN_ENDFILTEREDIT Notifies a header control's parent window that a filter edit has ended. This notification code is sent in the form of a WM_NOTIFY message.
HDN_ENDTRACK Notifies a header control's parent window that the user has finished dragging a divider. This notification code sent in the form of a WM_NOTIFY message.
HDN_FILTERBTNCLICK Notifies the header control's parent window when the filter button is clicked or in response to an HDM_SETITEM message.
HDN_FILTERCHANGE Notifies the header control's parent window that the attributes of a header control filter are being changed or edited.
HDN_GETDISPINFO Sent to the owner of a header control when the control needs information about a callback header item. This notification code is sent as a WM_NOTIFY message.
HDN_ITEMCHANGED Notifies a header control's parent window that the attributes of a header item have changed. This notification code is sent in the form of a WM_NOTIFY message.
HDN_ITEMCHANGING Notifies a header control's parent window that the attributes of a header item are about to change. This notification code is sent in the form of a WM_NOTIFY message.
HDN_ITEMCLICK Notifies a header control's parent window that the user clicked the control. This notification code is sent in the form of a WM_NOTIFY message.
HDN_ITEMDBLCLICK Notifies a header control's parent window that the user double-clicked the control. This notification code is sent in the form of a WM_NOTIFY message. Only header controls that are set to the HDS_BUTTONS style send this notification.
HDN_ITEMKEYDOWN Notifies a header control's parent window that a key has been pressed with an item selected. This notification code is sent in the form of a WM_NOTIFY message.
HDN_ITEMSTATEICONCLICK Notifies a header control's parent window that the user clicked an item's state icon.
HDN_OVERFLOWCLICK Sent by a header control to its parent when the header's overflow button is clicked. This notification code is sent in the form of an WM_NOTIFY message.
HDN_TRACK Notifies a header control's parent window that the user is dragging a divider in the header control. This notification code is sent in the form of a WM_NOTIFY message.
NM_CUSTOMDRAW (header) Sent by a header control to notify its parent window about drawing operations. This notification code is sent in the form of a WM_NOTIFY message.
NM_RCLICK (header) Notifies a tree-view control's parent window that the user has clicked the right mouse button within the control. This notification code is sent in the form of a WM_NOTIFY message.
NM_RELEASEDCAPTURE (header) Notifies a header control's parent window that the control is releasing mouse capture. This notification code is sent in the form of a WM_NOTIFY message.

Constants

Topic Contents
Header Control Styles Header controls have a number of styles, described in this section, that determine the control's appearance and behavior. You set the initial styles when you create the header control.