#include once "window9.bi"

Function GetMenuItemText(ByVal menu As HMENU, ByVal iPos As long) As USTRING Export
	#ifdef UNICODE
		Dim sText As USTRING = WSPACE(200)
		GetMenustring(menu, CInt(iPos), cast(any ptr , *sText),200,0)  	
	#else	
		Dim sText As String*200
		GetMenustring(menu, CInt(iPos), Cast(LPSTR,strptr(sText)),200,0)  	
	#EndIf
	return sText
End Function
