From 89a3f5c91feeaa6aab9b80c0b8a6d8f26e48a388 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 17 Jan 2006 09:53:14 +0000 Subject: [PATCH] Applied patch [ 1345297 ] Crash with MSW wxPrintDialog when pressed OK. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/printdlg.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)