HEADER statement  

Purpose

Manipulate a HEADER control in order to set/retrieve data.

Syntax

HEADER SEND hWin, ID&, Msg&, wParam&, lParam& [TO ResultVar&]

hWin

Handle of the window that owns the Header.

ID&

The Header control identifier.

Msg&

The message you want to send to the Header.

wParam&

The first message parameter (message dependent).

lParam&

The second message parameter (message dependent).

ResultVar&

Variable which receives the message return value.

Remarks

The HEADER statement is used to communicate with a HEADER control to set or retrieve various types of data.  While you may create a custom header control for your own purposes, the most common usage is to communicate with the HEADER control which is embedded in every LISTVIEW control.

To communicate with a LISTVIEW HEADER, use the LISTVIEW GET HEADERID to get the values for the hWin and ID& parameters.  Otherwise, those parameters would be assigned as with any other control.

HEADER GET COUNT hWin, ID& TO CountVar&

Retrieves the count of the items in a header control.  If the operation was successful, the count value is assigned to the variable specified by CountVar&.  If the operation failed, the value -1 is assigned to CountVar& instead.

HEADER GET ITEM hWin, ID&, Index&, ItemPtr [TO ResultVar&]

Retrieves an HD_Item structure which describes an item in a Header Control.  Index& defines the item to be retrieved (1=first, 2=second, etc.).  ItemPtr is the address of an HD_Item structure to be filled.  If the operation succeeds, true is assigned to the variable specified by ResultVar&.  If it fails, false is assigned instead.

HEADER SEND hWin, ID&, Msg&, wParam&, lParam& [TO ResultVar&]

A window message specified by Msg& is sent to the HEADER control, along with message dependent parameters (if any).  If a result is returned, it is assigned to the variable specified by ResultVar&.

HEADER SET ITEM hWin, ID&, Index&, ItemPtr [TO ResultVar&]

Sets the attributes of the specified item in a Header Control.  Index& defines the item to be set (1=first, 2=second, etc.).  ItemPtr is the address of an HD_Item structure which defines the attributes.  If the operation succeeds, true is assigned to the variable specified by ResultVar&.  If it fails, false is assigned instead.

See also

LISTVIEW