Export (0) Print
Expand All

ComboBox_AddString macro

Adds a string to a list in a combo box. If the combo box does not have the CBS_SORT style, the string is added to the end of the list. Otherwise, the string is inserted into the list and the list is sorted. You can use this macro or send the CB_ADDSTRING message explicitly.

Syntax


int ComboBox_AddString(
  HWND hwndCtl,
  LPCTSTR lpsz
);

Parameters

hwndCtl

Type: HWND

A handle to the control.

lpsz

Type: LPCTSTR

The string to add.

Return value

The return value is the zero-based index of the string 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

For more information, see CB_ADDSTRING.

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