diff --git a/src/msw/printdlg.cpp b/src/msw/printdlg.cpp index cde8522461..33e9028994 100644 --- a/src/msw/printdlg.cpp +++ b/src/msw/printdlg.cpp @@ -202,7 +202,8 @@ bool wxWindowsPrintNativeData::TransferTo( wxPrintData &data ) //// Printer name if (devMode->dmDeviceName[0] != 0) - data.SetPrinterName( devMode->dmDeviceName ); + // This syntax fixes a crash when using VS 7.1 + data.SetPrinterName( wxString(devMode->dmDeviceName, CCHDEVICENAME) ); //// Colour if (devMode->dmFields & DM_COLOR)