#include once "window9.bi"

#ifdef UNICODE
	Function GetComboBoxText(ByVal gadget As long,ByVal npos As Long) As USTRING Export
		dim ws as USTRING = wspace(200)
		SendMessage(Cast(HWND,GadgetID(gadget)), CB_GETLBTEXT ,CInt(npos) ,Cast(LPARAM,*ws))
		Return ws
	End Function	
#else	
	Function GetComboBoxText(ByVal gadget As long,ByVal npos As Long) As USTRING Export
		dim text As USTRING * 200
		SendMessage(Cast(HWND,GadgetID(gadget)), CB_GETLBTEXT ,CInt(npos) ,Cast(LPARAM,StrPtr(text)))
		Return text
	End Function	
#EndIf

