How to store wxPrintData info

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
kevenlin
In need of some credit
In need of some credit
Posts: 3
Joined: Tue May 24, 2005 3:18 pm

How to store wxPrintData info

Post by kevenlin » Tue May 24, 2005 3:29 pm

in my code :

Code: Select all

     wxPrinter *pr=new wxPrinter();
     wxPrintData data;
     wxPrintDialogData DialogData;
     pr->PrintDialog(this);
     wxPrinterError err=pr->GetLastError();
     if (err==wxPRINTER_NO_ERROR)
     {
        DialogData=pr->GetPrintDialogData();
        data=DialogData.GetPrintData();
                     .
                     .
I have got the wxPrintData.
but i can't get all the info ,so i want to save all to disk ,and restore it back
for next time ap runs

Please any one can help me ?

Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg » Thu May 26, 2005 1:21 pm

Is that really recommended? Things might change when users change printer settings, etc. Maybe even copy the whole app to a different location.

Anyway you can always use wxConfigBase classes and store by value whatever you want to store .. there is no real other alternative I am afraid.

Regards,
- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb

kevenlin
In need of some credit
In need of some credit
Posts: 3
Joined: Tue May 24, 2005 3:18 pm

Post by kevenlin » Thu May 26, 2005 2:49 pm

Thanks for reply my question.
my main goal is to pre-define the printer for one Ap

Code: Select all

ex : the ap needs to print A0 paper to Print#1 with A0 Size and Landscape and some other settings
                      print A1 paper to Print#1 with A1 Size and Landscape and some other settings
                      print A3 paper to Print#2 with A3 Size and Landscape
I  want to define once for later usage,so the other user don't have to do again,just printout with pre-defined papser size
and I can't find the other settings when the PaperId is "wxPAPER_NONE"
(no .example)

Post Reply