Files
harbour-core/harbour/tests/wcecon.prg
Przemyslaw Czerpak ec423de877 2007-10-19 16:16 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapicdp.h
  * harbour/source/rtl/cdpapi.c
    + added hb_cdpGetChar()

  + harbour/tests/wcecon.prg
    + added demonstration console program for WinCE,
      compile it using:
         hbmk -n -w -es2 -gtwvt wcecon

  * harbour/include/hbwince.h
  * harbour/source/common/hbwince.c
  * harbour/contrib/win32/w32_ole.c
  * harbour/contrib/odbc/odbc.c
    * use UNICODE macro instead of HB_WINCE to allow using Unicode
      WINAPI also in other MS-Windows versions

  * harbour/source/rtl/gtwvt/gtwvt.h
  * harbour/source/rtl/gtwvt/gtwvt.c
    + added support for Unicode IO

  * harbour/source/rtl/diskspac.c
  * harbour/source/rtl/disksphb.c
     ! fixed wrongly set error code
     ! fixed possible access to uninitialized memory
     * use GetDiskFreeSpaceEx() on WinCE instead of GetDiskFreeSpace()
       for disk larger then 4GB - I do not know if PocketPC have such
       large devices now or if WinCE can support it but for sure it will
       somewhere in the future
2007-10-19 14:16:35 +00:00

75 lines
1.7 KiB
Plaintext

/*
* $Id$
*/
/*
* Harbour Project source code:
* demonstration/test code for WinCE console program
*
* Copyright 2007 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
* www - http://www.harbour-project.org
*
*/
#include "hbgtinfo.ch"
proc main()
local nMaxScrRow, nMaxScrCol
local i, j, k
/* set OEM font encoding for non unicode modes */
hb_gtInfo( GTI_CODEPAGE, 255 )
/* Set EN CP-437 encoding */
HB_SETCODEPAGE( "EN" )
HB_SETTERMCP( "EN" )
/* Set font size */
hb_gtInfo( GTI_FONTSIZE, 12 )
hb_gtInfo( GTI_FONTWIDTH, 6 )
/* resize console window using new font size */
SetMode( MaxRow() + 1, MaxCol() + 1 )
/* get screen dimensions */
nMaxScrRow = hb_gtInfo( GTI_DESKTOPROWS )
nMaxScrCol = hb_gtInfo( GTI_DESKTOPCOLS )
/* resize console window to the screen size */
SetMode( nMaxScrRow, nMaxScrCol )
/* display console window size */
? "rows =", ltrim( str( maxrow() + 1 ) )
? "cols =", ltrim( str( maxcol() + 1 ) )
inkey( 0 )
/* display infomration aboout used OS, harbour version and GT driver */
alert( OS() + ";" + VERSION() + ";" + HB_GTVERSION() )
/* display all characters */
?
for i := 0 to 15
for j := 0 to 15
dispout( " " + chr( i * 16 + j ) )
next
?
next
inkey( 0 )
/* display boxes */
?; devout( "ÚÄÂÄ¿ ÉÍËÍ» ÕÍÑ͸ ÖÄÒÄ· ÜÜÜ" )
?; devout( "³ ³ ³ º º º ÃÄÅÄ´ ÇÄ×Ķ ÝþÞ" )
?; devout( "ÃÄÅÄ´ ÌÍÎ͹ ³ ³ ³ º º º ÝÛÞ" )
?; devout( "³ ³ ³ º º º ÆÍØÍµ ÌÍÎ͹ ÝþÞ" )
?; devout( "ÀÄÁÄÙ ÈÍÊͼ ÔÍÏ; ÓÄÐĽ ßßß" )
inkey( 0 )
?
? "@ - interrupt, keycodes test "
while ( k := inkey( 0 ) ) != 64
? ; devout( "key=" + str( k, 4 ) + ", char='" + chr( k ) + "'" )
enddo
return