Windows printer commands 
Author Message
 Windows printer commands

Hi,

  I would like to 'command' the printer to go into landscape or portrait mode.
Any ideas how this would be done using API calls?

TIA,

   ____    _    ____      ____  _____
  |  _ \  / \  / ___) __ | ___)(_   _) Don Schullian

  |____//_/ \_\(____/\__/|_|     |_|    www.DASoftVSS.com
  ___________________________________   www.basicguru.com
      Vertical Software Solutions



Fri, 26 Apr 2002 03:00:00 GMT  
 Windows printer commands
Don, investigate the PRINTDLG structure which is passed to PrintDlg()
API function.  The key is the DEVMODE structure, which is referenced
in the PRINTDLG structure.  You need to set the appropriate flags in
the DEVMODE.DMFIELDS member.

(Using the PrinterDialog() wrapper function in COMDLG32.INC is helpful
to start off with).

Be sure to read up about allocating and releasing the memory occupied
by the DEVMODEstructure... if PrintDlg() alters DEVMODE, it returns a
new handle in the PRINTDLG structure.  Your code is responsible to
destroy the new memory block, but the PrintDlg() API cleans up the
initial one for you.  Petzold covers this well (if my memory is
working well enough  at this late hour!)

Quote:

>Hi,

>  I would like to 'command' the printer to go into landscape or portrait mode.
>Any ideas how this would be done using API calls?

>TIA,

Lance
powerbasic Support

-------------------------------------------------------------------------
PowerBASIC, Inc.      | 800-780-7707 Sales | "We put the Power in Basic!"
316 Mid Valley Center | 831-659-8000 Voice | http://www.powerbasic.com



Sat, 27 Apr 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Getting Printer Status - Out Of Paper or Printer Off from Windows

2. printing from clipper prog in windows env to windows printer

3. Print to a Windows Share or Windows printer?

4. How send to printer under Windows 3.11, Windows 95

5. C5b - Prop Printer Command Problem Across Network

6. The PRINTER{} Command

7. help to send commands to printer in 2003cw

8. Sending Post Script extension commands to a printer

9. PCL commands for 6L printer

10. Epson printer commands

11. Epson Printer Commands

12. PCL command for BIG fonts in printer

 

 
Powered by phpBB® Forum Software