Share via


CComboBoxEx::InsertItem

Inserts a new item in a ComboBoxEx control.

int InsertItem( 
   const COMBOBOXEXITEM* pCBItem  
);

Parameters

  • pCBItem
    A pointer to a COMBOBOXEXITEM structure that will receive the item information. This structure contains callback flag values for the item.

Return Value

The index at which the new item was inserted if successful; otherwise -1.

Remarks

When you call InsertItem, a WM_NOTIFY message with CBEN_INSERTITEM notification will be sent to the parent window.

Requirements

Header: afxcmn.h

See Also

Reference

CComboBoxEx Class

Hierarchy Chart

CComboBoxEx::GetItem

CComboBoxEx::SetItem