CFrameWnd::AddComboBoxString

This method adds a string to a combo box on the command bar, and associate it with a data element. This method adds the string at the end of the list of strings in the combo box's list box.

At a Glance

Header file: Afxwin.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 1.0 and later

Syntax

BOOL AddComboBoxString ( UINT wStringResourceID, long lItemData=0 );
BOOL AddComboBoxString ( LPCTSTR
lpszString, long lItemData=0 );

Parameters

wStringResourceID
Resource identifier of a resource that contains the null-terminated string to be added to the combo box.
lpszString
Long pointer to the null-terminated string to be added to the combo box.
lItemData
Specifies a new value to be associated with the item. You can use this parameter to pass a pointer to a data structure that contains additional information about the selection.

Return Value

Nonzero indicates success. Zero indicates failure.

Remarks

Use the CB_GETITEMDATA message to retrieve the data you pass to this method in the lItemData parameter.

This method of the CFrameWnd class is unique to Windows CE.