Header_GetOrderArray macro (commctrl.h)

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

Syntax

void Header_GetOrderArray(
   hwnd,
   iCount,
   lpi
);

Parameters

hwnd

Type: HWND

A handle to a header control.

iCount

Type: int

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

lpi

Type: int*

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

Return value

None

Remarks

The number of elements in lpiArray is specified in iSize 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

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

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

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

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header commctrl.h