HDM_GETORDERARRAY message

Gets the current left-to-right order of items in a header control. You can send this message explicitly or use the Header_GetOrderArray macro.

Parameters

wParam

The number of integer elements that lParam can hold. This value must be equal to the number of items in the control (see HDM_GETITEMCOUNT).

lParam

A pointer to an array of integers that receive the index values for items in the header.

Return value

Returns nonzero if successful, and the buffer at lParam receives the item number for each item in the header control in the order in which they appear from left to right. Otherwise, the message returns zero.

Remarks

The number of elements in lParam is specified in wParam and must be equal to the number of items in the control. For example, the following code fragment will reserve enough memory to hold the index values.



int iItems,

    *lpiArray;



// Get memory for buffer.

(iItems = SendMessage(hwndHD, HDM_GETITEMCOUNT, 0,0))!=-1)

    if(!(lpiArray = calloc(iItems,sizeof(int))))

MessageBox(hwnd, "Out of memory.","Error", MB_OK);

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Commctrl.h

 

 

Community Additions

ADD
Show:
© 2014 Microsoft