Files
harbour-core/harbour/contrib/hbwin/tests/testprn3.prg
Viktor Szakats 81c9b0506c 2010-06-04 15:21 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/*
    * Deleted 'www.' from harbour-project.org website name.
      (www.harbour-project.org -> harbour-project.org)
2010-06-04 13:32:23 +00:00

48 lines
975 B
Plaintext

/*
* $Id$
*/
/*
* Harbour Project source code:
*
* Copyright 2009 Viktor Szakats (harbour.01 syenar.hu)
* www - http://harbour-project.org
*
*/
#include "simpleio.ch"
PROCEDURE Main()
Dump( WIN_PRINTERLIST( .F., .F. ) )
Dump( WIN_PRINTERLIST( .F., .T. ) )
Dump( WIN_PRINTERLIST( .T., .F. ) )
Dump( WIN_PRINTERLIST( .T., .T. ) )
? "WIN_PRINTERGETDEFAULT:", ">" + WIN_PRINTERGETDEFAULT() + "<"
? "WIN_PRINTERSTATUS:", WIN_PRINTERSTATUS()
RETURN
STATIC PROCEDURE Dump( a )
LOCAL b, c
? "=================="
FOR EACH b IN a
?
IF ValType( b ) == "A"
FOR EACH c IN b
?? c:__enumIndex(), c
IF c:__enumIndex() == 2
?? ">>" + WIN_PRINTERPORTTONAME( c ) + "<<", "|>>" + WIN_PRINTERPORTTONAME( c, .T. ) + "<<|"
ENDIF
?
NEXT
? "-----"
ELSE
? b, WIN_PRINTEREXISTS( b ), WIN_PRINTERSTATUS( b )
ENDIF
NEXT
RETURN