]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/printdlg.cpp
minimize overlay area to avoid eg scrolling artifacts when using a caret
[wxWidgets.git] / src / msw / printdlg.cpp
index 363e9302c6e00c4f0bece4290cefa0b77eabeeaa..e692c3104b0aa7c8f8cbeb2194f232b1515d568d 100644 (file)
@@ -198,7 +198,11 @@ bool wxWindowsPrintNativeData::TransferTo( wxPrintData &data )
         } else {
             data.SetBin(wxPRINTBIN_DEFAULT);
         }
-
+        if (devMode->dmFields & DM_MEDIATYPE)
+        {
+            wxASSERT(devMode->dmMediaType != wxPRINTMEDIA_DEFAULT);
+            data.SetMedia(devMode->dmMediaType);
+        }
         //// Printer name
         if (devMode->dmDeviceName[0] != 0)
             // This syntax fixes a crash when using VS 7.1
@@ -547,7 +551,11 @@ bool wxWindowsPrintNativeData::TransferFrom( const wxPrintData &data )
 
             devMode->dmFields |= DM_DEFAULTSOURCE;
         }
-
+        if (data.GetMedia() != wxPRINTMEDIA_DEFAULT)
+        {
+            devMode->dmMediaType = data.GetMedia();
+            devMode->dmFields |= DM_MEDIATYPE;
+        }
         GlobalUnlock(hDevMode);
     }