Header_SetItem  TIXUB4 

The Header_SetItem macro sets the attributes of the specified item in a header control. You can use this macro or explicitly send the HDM_SETITEM1MM6A2D message.

BOOL Header_SetItem(

    hwndHD,

 

    index,

 

    phdi

 

   );

 

 

Parameters

hwndHD

Handle to the header control.

index

Index of the item whose attributes are to be changed.

phdi

Pointer to an HD_ITEMZTW0WO structure. When the HDM_SETITEM message is sent, the mask member indicates the attributes to set. The other members specify new attributes.

 

Return Values

If the operation succeeds, the return value is TRUE.

If the operation fails, the return value is FALSE.

Remarks

The HDN_ITEMCHANGING3N8KX8 notification message is sent to the parent window before the item attributes are changed. The parent window can return FALSE to prevent the changes, and in that case, the Header_SetItem macro returns FALSE. If the parent window returns TRUE, the changes are made and the parent window receives the HDN_ITEMCHANGED notification message.

The Header_SetItem macro is defined as follows:

#define Header_SetItem(hwndHD, index, phdi) \

    (BOOL)SendMessage((hwndHD), HDM_SETITEM,  \

    (WPARAM)(int)(index), (LPARAM)(const HD_ITEM FAR*)(phdi))

 

See Also

HD_ITEM, HDN_ITEMCHANGED, HDN_ITEMCHANGING