Help Center

CHeader.InsertItemmethod

Inserts a new item into a header control.

WindowsmethodCHeader.incdocumented

Syntax

FUNCTION InsertItem (BYVAL hHeader AS HWND, BYVAL i AS DWORD, BYVAL phdi AS HDITEMW PTR) AS LONG
FUNCTION InsertItem (BYVAL hHeader AS HWND, BYVAL i AS DWORD, BYREF hdi AS HDITEMW) AS LONG

Parameters

NameDescription
hHeaderThe handle of the header control.
iThe index of the item after which the new item is to be inserted. The new item is inserted at the end of the header control if i is greater than or equal to the number of items in the control. If i is zero, the new item is inserted at the beginning of the header control.
phdiA pointer to an HDITEMW structure that contains information about the new item.

Return value

Returns the index of the new item if successful, or -1 otherwise.

Description

Inserts a new item into a header control.

Reference

  • Include file CHeader.inc
  • Defined in AfxNova/CHeader.inc:403
  • Documented in Windows/WIndows Controls/CHeader Class.md
  • Topic: CHeader Class