+
+
+ // this is needed for printing to a printer:
+ // only interesting for printer/PS output
+ int pageWidth, pageHeight; //GetSize() still needs int at the moment
+ struct
+ {
+ int top, bottom, left, right;
+ } margins;
+
+ if(
+#ifdef __WXMSW__
+ dc.IsKindOf(CLASSINFO(wxPrinterDC)) ||
+#endif
+ dc.IsKindOf(CLASSINFO(wxPostScriptDC)))
+ {
+ VAR(wxThePrintSetupData);
+
+ dc.GetSize(&pageWidth, &pageHeight);
+ dc.StartDoc(_("Printing..."));
+ dc.StartPage();
+ margins.top = (1*pageHeight)/10; // 10%
+ margins.bottom = (9*pageHeight)/10; // 90%
+ margins.left = (1*pageWidth)/10;
+ margins.right = (9*pageWidth)/10;
+ }
+ else
+ {
+ margins.top = 0; margins.left = 0;
+ margins.right = -1;
+ margins.bottom = -1;
+ }
+ position.y = margins.right;
+ position.x = margins.left;