Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
Windows Controls
Control Library
Header Control
Messages
 HDM_SETITEM Message
HDM_SETITEM Message

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

Syntax

To send this message, call the SendMessage function as follows.
lResult = SendMessage(    // returns LRESULT in lResult
   hWndControl,           // (HWND) handle to destination control
   HDM_SETITEM,           // (UINT) message ID
   wParam,                // = (WPARAM)(int) iIndex; 
   lParam                 // = const (LPARAM)(LPHDITEM) phdItem;
);

Parameters

iIndex
The current index of the item whose attributes are to be changed.
phdItem
A pointer to an HDITEM structure that contains item information. When this message is sent, the mask member of the structure must be set to indicate which attributes are being set.

Return Value

Returns nonzero upon success, or zero otherwise.

Remarks

The HDITEM structure that supports this message supports item order and image list information. By using these members, you can control the order in which items are displayed and specify images to appear with items.

Message Information

Headercommctrl.h
Minimum operating systems Windows NT 3.51, Windows 95
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker