CFrameWnd::AddComboBoxString

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

Syntax

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

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

At a Glance

Header File Afxwin.h
Platforms
Versions 1.0 and later

Parameters

wStringResourceID
Resource identifier of a resource that contains the null-terminated string to be added to the combo box.
lpszString
A 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 could use this parameter to pass a pointer to a data structure containing additional information about the selection.

Return Value

A non-zero value if the function succeeds. Zero if it fails.

Remarks

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

Note This member function of the CFrameWnd class is unique to Windows CE.

See Also

CFrameWnd Overview, CFrameWnd Member Functions, Frame Windows and Splitter Windows