CToolBarCtrl::AddStrings

int AddStrings( LPCTSTR lpszStrings );

Return Value

The zero-based index of the first new string added if successful; otherwise –1.

Parameters

lpszStrings

Address of a buffer that contains one or more null-terminated strings to add to the toolbar’s string list. The last string must be terminated with two null characters.

Remarks

Call this function to add a new string or strings to the list of strings available for a toolbar control. Strings in the buffer must be separated by a null character.

You must ensure that the last string has two null terminators. To properly format a constant string, you might write it as:

// one null added automatically
lpszStrings = "Only one string to add\0";

or:

// adds three strings with one call
lpszStrings = "String 1\0String 2\0String 3\0";

You should not pass a CString object to this function since it is not possible to have more than one null character in a CString.

CToolBarCtrl OverviewClass MembersHierarchy Chart

See Also   CToolBarCtrl::AddString, CToolBarCtrl::AddButtons, CToolBarCtrl::InsertButton, CToolBarCtrl::AddBitmap