#include once "window9.bi"

Function GetToolBarTextButton(byval TBar As Integer,ByVal ButtonID As Integer) As USTRING export
	#ifdef UNICODE
		Dim sRet As USTRING = wspace(256)
		SendMessage(cast(HWND,TBar),TB_GETBUTTONTEXT,ButtonID,Cast(LPARAM,*sRet))  	
	#else	
		Dim sRet As String*256
		SendMessage(cast(HWND,TBar),TB_GETBUTTONTEXT,ButtonID,Cast(LPARAM,StrPtr(sRet)))  	
	#EndIf
	Return sRet
End Function
