HDM_GETITEM Message

Gets information about an item in a header control. You can send this message explicitly or use the Header_GetItem 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_GETITEM,           // (UINT) message ID
   wParam,                // = (WPARAM)(int) index; 
   lParam                 // = (LPARAM)(LPHDITEM) phdi;
);

Parameters

index
The index of the item for which information is to be retrieved.
phdi
A pointer to an HDITEM structure. When the message is sent, the mask member indicates the type of information being requested. When the message returns, the other members receive the requested information. If the mask member specifies zero, the message returns TRUE but copies no information to the structure.

Return Value

Returns TRUE if successful, or FALSE otherwise.

Remarks

If the HDI_TEXT flag is set in the mask member of the HDITEM structure, the control may change the pszText member of the structure to point to the new text instead of filling the buffer with the requested text. Applications should not assume that the text will always be placed in the requested buffer.

Message Information

Headercommctrl.h
Minimum operating systems Windows NT 3.51, Windows 95
Tags :


Page view tracker