Gets the length of the note text that may be displayed in the description for a command link button
#include <GuiButton.au3>
_GUICtrlButton_GetNoteLength ( $hWnd )
$hWnd | Control ID/Handle to the control |
Success: | the length of the note text in WCHARs—not including any terminating NULL WCHAR. |
Failure: | 0. |
This function works only with the $BS_COMMANDLINK and $BS_DEFCOMMANDLINK button styles.
Windows Vista or later.
_GUICtrlButton_GetNote, _GUICtrlButton_SetNote
Search BCM_GETNOTELENGTH in MSDN Library.
#include "Extras\HelpFileInternals.au3"
#include <GuiButton.au3>
#include <GUIConstantsEx.au3>
#include <WindowsStylesConstants.au3>
; Note: The handle from these button(s) can NOT be read with GUICtrlRead
Example()
Func Example()
Local $hGUI
$hGUI = GUICreate("Buttons", 400, 400)
_MemoCreate(10, 65, 390, 325, $WS_VSCROLL)
Local $hBtn = _GUICtrlButton_Create($hGUI, "Button1", 10, 10, 160, 40, BitOR($BS_COMMANDLINK, $BS_DEFPUSHBUTTON, $BS_PUSHLIKE))
_GUICtrlButton_SetNote($hBtn, "This is a test of Vista")
GUISetState(@SW_SHOW)
_MemoWrite("Note: " & _GUICtrlButton_GetNote($hBtn))
_MemoWrite("Note Length: " & _GUICtrlButton_GetNoteLength($hBtn))
_MemoWrite("Button Text: " & _GUICtrlButton_GetText($hBtn))
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
EndSwitch
WEnd
Exit
EndFunc ;==>Example