Düzenle

Aracılığıyla paylaş


TB_GETBUTTONTEXT message

Retrieves the display text of a button on a toolbar.

Parameters

wParam

Command identifier of the button whose text is to be retrieved.

lParam

Pointer to a buffer that receives the button text.

Return value

Returns the length, in characters, of the string pointed to by lParam. The length does not include the terminating null character. If unsuccessful, the return value is -1.

Remarks

Security Warning: Using this message incorrectly might compromise the security of your program. This message does not provide a way for you to know the size of the buffer. If you use this message, first call the message passing NULL in the lParam, this returns the number of characters, excluding NULL that are required. Then call the message a second time to retrieve the string. You should review the Security Considerations: Microsoft Windows Controls before continuing.

The returned string corresponds to the text that is currently displayed by the button.

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_GETBUTTONTEXTW (Unicode) and TB_GETBUTTONTEXTA (ANSI)

See also

Reference

TB_GETBUTTONINFO

TB_GETSTRING

TB_SETBUTTONINFO