TB_ADDSTRING message

Adds a new string to the toolbar's string pool.

Parameters

wParam

Handle to the module instance with an executable file that contains the string resource. If lParam instead points to a character array with one or more strings, set this parameter to NULL.

lParam

Resource identifier for the string resource, or a pointer to a TCHAR array. See Remarks.

Return value

Returns the index of the first new string if successful, or -1 otherwise.

Remarks

If wParam is NULL, lParam points to a character array with one or more null-terminated strings. The last string in the array must be terminated with two null characters.

If wParam is the HINSTANCE of the application or of another module containing a string resource, lParam is the resource identifier of the string. Each item in the string must begin with an arbitrary separator character, and the string must end with two such characters. For example, the text for three buttons might appear in the string table as "/New/Open/Save//". The message returns the index of "New" in the toolbar's string pool, and the other items are in consecutive positions.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Commctrl.h
Unicode and ANSI names
TB_ADDSTRINGW (Unicode) and TB_ADDSTRINGA (ANSI)