Retrieves the text for each button of a Tool Bar control.
cGetTBText (window-handle)
(i) window-handle Windows handle to a Tool Bar common control.
(s) list List of text associated with each button.
This function retrieves the text for each button of a Tool Bar control. The return string contains each button's text separated by a tab character delimiter. Since button text is "optional", a single tab character designates buttons without text. For example, if there was no text associated with buttons, all that would be returned from this function is a list of tabs.
The class name for the Tool Bar control is "ToolbarWindow32".
32-bit Extender
This function is designed for Windows 32-bit application controls. It cannot be used on Windows 64-bit controls.
64-bit Extender
This function is designed for Windows 64-bit application controls. It cannot be used on Windows on 32-bit controls.
AddExtender("wwctl44i.dll",0,"wwctl64i.dll") ; Find the Explorer tool bar handle hwndex = DllHwnd("Exploring ") hwnd = cWndbyclass(hwndex,"Worker") hwnd = cWndbyclass(hwnd,"ReBarWindow32") hwnd = cWndbyclass(hwnd,"ToolbarWindow32") buttontext = "Forward" ; Get any button text alltext = cGetTbText(hwnd) ;Get the index of the button select1=ItemLocate(buttontext, alltext, @TAB) If select1 == 0 Message("Tool Bar Button","%buttontext% Not Found") wintext=StrReplace(alltext,@TAB,@CRLF) Message("Text found",alltext) EndIf Exit
cClickButton, cWndByClass, cWndInfo, DLLhwnd (WIL help).