]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/printdlg.cpp
Fixed non-precompiled headers compilation
[wxWidgets.git] / src / msw / printdlg.cpp
index 9d96491f6742461db63e620f1dd9322f1ce87e81..cedf15ad4609b5f1646aff2a5d185620ea5b9ef7 100644 (file)
@@ -420,7 +420,10 @@ bool wxWindowsPrintNativeData::TransferFrom( const wxPrintData &data )
         wxString name = data.GetPrinterName();
         if (!name.empty())
         {
         wxString name = data.GetPrinterName();
         if (!name.empty())
         {
-            wxStrncpy(devMode->dmDeviceName, name.wx_str(),
+            // NB: the cast is needed in the ANSI build, strangely enough
+            //     dmDeviceName is BYTE[] and not char[] there
+            wxStrncpy(wx_reinterpret_cast(wxChar *, devMode->dmDeviceName),
+                      name.wx_str(),
                       WXSIZEOF(devMode->dmDeviceName) - 1);
             devMode->dmDeviceName[WXSIZEOF(devMode->dmDeviceName) - 1] = wxT('\0');
         }
                       WXSIZEOF(devMode->dmDeviceName) - 1);
             devMode->dmDeviceName[WXSIZEOF(devMode->dmDeviceName) - 1] = wxT('\0');
         }