#include once "window9.bi"

Function GetListBoxText(ByVal gadget As Long,ByVal npos As Long) As USTRING Export
	#ifdef UNICODE
		dim sText As USTRING = WSPACE(200)
		SendMessage(GadgetID(gadget), lb_GetText ,CInt(npos) ,Cast(LPARAM,*sText))   	
	#else	
		dim sText As STRING*200
		SendMessage(GadgetID(gadget), lb_GetText ,CInt(npos) ,Cast(LPARAM,StrPtr(sText)))   	
	#EndIf
	Return sText
End Function
