What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » C++ Printing

C++ Printing
Author: Message:
DJeX
Veteran Member
*****

Avatar


Posts: 1138
Reputation: 11
– / Male / –
Joined: Jul 2003
O.P. Roll Eyes  C++ Printing
I want to use the Print() function to print the contents of my form but I want to print it landscape not portrait. How would I do this?
[Image: top.gif]
01-05-2005 11:37 PM
Profile PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: C++ Printing
Does the documentation for Print() tell you how? If not, then you may need to look at part of the API, probably something like the Print Spooler API or something.
[Image: spartaafk.png]
01-06-2005 05:27 PM
Profile PM Web Find Quote Report
Geniuzzz
Junior Member
**

Avatar

Posts: 23
56 / Male / –
Joined: Jan 2005
RE: C++ Printing
Hi,

I would try this:


[list=1]
[*] use getPrinter to retrieve the printer settings into a PRINTER_INFO_2 structure
[*] modify the orientation inside that structure (the orientation is a member of the DEVMODE which is a member of  PRINTER_INFO_2
[*] use setPrinter
[/list]

and then print whatever you want to print...

have fun:P
Geniuzzz
01-07-2005 10:57 AM
Profile PM Find Quote Report
DJeX
Veteran Member
*****

Avatar


Posts: 1138
Reputation: 11
– / Male / –
Joined: Jul 2003
O.P. RE: C++ Printing
How would I put that in code?

Like this (Sorry i'm new to C++):

---------------------------------------------------------------------

getPrinter(DefultPrinter) = PRINTER_INFO_2;

PRINTER_INFO_2->Orientation.Landscape;

setPrinter;
---------------------------------------------------------------------


I use Bornald C++ Builder 6 so the "->" is how you use functions and properties of a component or command. Kinda like when Visual Basic uses the peroid "." to do the same.

This post was edited on 01-07-2005 at 08:25 PM by DJeX.
[Image: top.gif]
01-07-2005 08:24 PM
Profile PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: C++ Printing
quote:
Originally posted by DJeX
I use Bornald C++ Builder 6 so the "->" is how you use functions and properties of a component or command. Kinda like when Visual Basic uses the peroid "." to do the same.
You do know that is part of the language, not just some Borland thing?
I assume you have a book on C++ to learn from. If not, then get something like 'Teach Yourself C++ in 21 Days'.
[Image: spartaafk.png]
01-08-2005 01:13 PM
Profile PM Web Find Quote Report
DJeX
Veteran Member
*****

Avatar


Posts: 1138
Reputation: 11
– / Male / –
Joined: Jul 2003
O.P. RE: C++ Printing
Yea I got that book
[Image: top.gif]
01-08-2005 10:44 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On