共用方式為


CMFCToolBarComboBoxButton::AddItem

Appends a unique item to the list box.

virtual INT_PTR AddItem(
   LPCTSTR lpszItem,
   DWORD_PTR dwData=0 
);

Parameters

  • [in] lpszItem
    The text of the item to add to the list box.

  • [in] dwData
    The data associated with the item to add to the list box.

Return Value

The index of the last item in the list box.

Remarks

Do not use this method when the list box style is sorted.

If the item text is already in the list box, the new data is stored with the existing item. The search for the item is case sensitive.

Requirements

Header: afxtoolbarcomboboxbutton.h

See Also

Reference

CMFCToolBarComboBoxButton Class

Hierarchy Chart