HD_ITEM

The HD_ITEM structure contains information about an item in a header control.

typedef struct _HD_ITEM { hdi

UINT mask;

int cxy;

LPTSTR pszText;

HBITMAP hbm;

int cchTextMax;

int fmt;

LPARAM lParam;

} HD_ITEM;

Members

mask

Mask flags that indicate which of the other structure members contain valid data. This member can be a combination of the following values:

Value Meaning
HDI_BITMAP The hbm member is valid.
HDI_FORMAT The fmt member is valid.
HDI_HEIGHT The cxy member is valid and specifies the height of the item.
HDI_LPARAM The lParam member is valid.
HDI_TEXT The pszText and cchTextMax members are valid.
HDI_WIDTH The cxy member is valid and specifies the width of the item.

cxy

Width or height of item.

pszText

Pointer to item string.

hbm

Handle to item bitmap.

cchTextMax

Length of item string, in characters.

fmt

A set of bit flags that specify the item's format.

This member can include one of the following text justification or right-to-left reading order bit flags:

Value Meaning
HDF_CENTER Centers the contents of the item.
HDF_LEFT Left aligns the contents of the item.
HDF_RIGHT Right aligns the contents of the item.
HDF_RTLREADING Displays text using right-to-left reading order on Hebrew or Arabic systems.

The preceding value is combined with one of the following values:

Value Meaning
HDF_BITMAP The item displays a bitmap.
HDF_OWNERDRAW The owner window of the header control draws the item.
HDF_STRING The item displays a string.

You can use the HDF_JUSTIFYMASK mask to isolate the text justification portion of the fmt member.

lParam

Application-defined item data.