#include <WinTen.h>
#include <Windows.h>
#include <ClipApi.h>

//----------------------------------------------------------------------------//

CLIPPER LbxGetItem()  //  hWnd of a ListBox, nItem n§ of Item to get Text
{
   HWND hWnd   = ( HWND ) _parni( 1 );
   WORD wLen   = SendMessage( hWnd, LB_GETTEXTLEN, _parni( 2 ) - 1, 0 );
   LPSTR pText = _xgrab( wLen + 1 );

   if( wLen )
   {
      SendMessage( hWnd, LB_GETTEXT, _parni( 2 ) - 1, ( LONG ) pText );
      _retclen( pText, wLen );
   }
   else
      _retc( "" );
   _xfree( pText );
}

//----------------------------------------------------------------------------//
