ComboBox_InsertItemData macro

Inserts item data in a list in a combo box at the specified location. You can use this macro or send the CB_INSERTSTRING message explicitly.

Syntax


int ComboBox_InsertItemData(
  HWND hwndCtl,
  int index,
  LPARAM data
);

Parameters

hwndCtl

Type: HWND

A handle to the control.

index

Type: int

The zero-based index in the list at which to insert the item data, or –1 to add it to the end of the list.

data

Type: LPARAM

The item data to insert.

Return value

The return value is the zero-based index of the item in the list. If an error occurs, the return value is CB_ERR. If there is insufficient space to store the new string, the return value is CB_ERRSPACE.

Remarks

Use this macro for a list in a combo box with an owner-drawn style but without the CBS_HASSTRINGS style. For more information, see CB_INSERTSTRING.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Windowsx.h

 

 

Community Additions

ADD
Show:
© 2014 Microsoft