Header_SetOrderArray macro (commctrl.h)

Sets the left-to-right order of header items. You can use this macro or send the HDM_SETORDERARRAY message explicitly.

Syntax

BOOL Header_SetOrderArray(
   HWND hwnd,
   int  iCount,
   int  *lpi
);

Parameters

hwnd

Type: HWND

A handle to a header control.

iCount

Type: int

The size of the buffer at lpiArray, in elements. This value must equal the value returned by HDM_GETITEMCOUNT.

lpi

Type: int*

A pointer to an array that specifies the order in which items should be displayed, from left to right. For example, if the contents of the array are {2,0,1}, the control displays item 2, item 0, and item 1, from left to right.

Return value

Type: BOOL

Returns nonzero if successful, or zero otherwise.

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