]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/printdlg.cpp
Huge streams checking and warning fixes.
[wxWidgets.git] / src / msw / printdlg.cpp
index 56e9af2adb0e32b1be4501addf556e2d6f74306a..abe7e64ad4927453650ce4c904af8848b8443b5c 100644 (file)
@@ -279,6 +279,11 @@ bool wxWindowsPrintNativeData::TransferTo( wxPrintData &data )
         else
             data.SetQuality( wxPRINT_QUALITY_HIGH );
 
+        if (devMode->dmDriverExtra > 0)
+            data.SetPrivData( (char *)devMode+devMode->dmSize, devMode->dmDriverExtra );
+        else
+            data.SetPrivData( NULL, 0 );
+
         GlobalUnlock(hDevMode);
     }
 
@@ -469,6 +474,12 @@ bool wxWindowsPrintNativeData::TransferFrom( const wxPrintData &data )
         }
         devMode->dmPrintQuality = quality;
         devMode->dmFields |= DM_PRINTQUALITY;
+        
+        if (data.GetPrivDataLen() > 0)
+        {
+            memcpy( (char *)devMode+devMode->dmSize, data.GetPrivData(), data.GetPrivDataLen() );
+            devMode->dmDriverExtra = data.GetPrivDataLen();
+        }
 
         if (data.GetBin() != wxPRINTBIN_DEFAULT)
         {