Help Center

CToolbar.GetStringmethod

Retrieves a string from a toolbar's string pool.

WindowsmethodCToolbar.incdocumented

Syntax

FUNCTION GetString (BYVAL hToolbar AS HWND, BYVAL iString AS SHORT, BYVAL pBuffer AS WSTRING PTR, BYVAL cchMax AS SHORT) AS LONG

Parameters

NameDescription
hToolbarHandle to the toolbar control.
iStringThe index of the string.
pBufferPointer to a buffer used to return the string.
cchMaxThe he length of the lParam buffer.

Return value

Returns the string length if successful, or -1 otherwise.

Description

Retrieves a string from a toolbar's string pool.

Remarks

This message returns the specified string from the toolbar's string pool. It does not necessarily correspond to the text string currently being displayed by a button. To retrieve a button's current text string, call the GetButtonText method.

Reference

  • Include file CToolbar.inc
  • Defined in AfxNova/CToolbar.inc:755
  • Documented in Windows/WIndows Controls/CToolbar Class.md
  • Topic: CToolbar Class