Printer setup using vc++ 4.0 
Author Message
 Printer setup using vc++ 4.0

I am using windows nt 4.0 and Visual C++ 4.0 standard edition.

I need to know how to hard code into my program the printer options
such as printing landscape and changing paper types without using
the printer setup dialog box.

Any help would be greatly appreciated.



Sun, 13 Aug 2000 03:00:00 GMT  
 Printer setup using vc++ 4.0

Quote:
>I need to know how to hard code into my program the printer options
>such as printing landscape and changing paper types without using
>the printer setup dialog box.

Kenneth,

If you're using MFC and the Doc/View architecture, here's a tip posted
by someone a few months ago that illustrates the sort of thing you can
do to set landscape mode:

"
If you put this code in your apps InitInstance method, you will
default to landscape mode.

    PRINTDLG printDlg;
    BOOL bSuccess = GetPrinterDeviceDefaults (&printDlg);
    DEVMODE* pDEVMODE = (DEVMODE*)GlobalLock (printDlg.hDevMode);
    pDEVMODE -> dmOrientation = DMORIENT_LANDSCAPE;
    GlobalUnlock (printDlg.hDevMode);
"

I'm not sure if you can affect the paper bin settings quite so easily,
however the documentation for ResetDC says you do it using that.

Dave
----
Address is altered to discourage junk mail.
Remove ".---" for the real address.



Sun, 13 Aug 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Non VC++ 4.0 using DAO and ODBC under VC++ 4.0

2. Windows Default Printers and Default Printer Setups

3. nt 4.0 compatable with vc++ 4.0?

4. Beginner: Problems Using OLE Forms using VC++ 4.0

5. uart+serial port on NT 4.0 using VC++5.0

6. Using functions in DLL created in VC 4.0 from Visual Basic

7. Anyone using VC 4.0?

8. TECH: Using Internet Explorer 4.0 with VC 5.0??

9. Error when using embedded VC 4.0

10. NT 4.0 and VC 4.0 Debug symbols

11. VC 4.0 and NT 4.0

12. Does VC 4.0 run under NT 4.0?

 

 
Powered by phpBB® Forum Software