From b98b75cddfbdc690b35c37601e4f7ee341bb92b8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 13 Jan 2012 11:32:44 +0000 Subject: [PATCH 1/1] Correct handle passed to DocumentProperties() in MSW printing code. We were passing a pointer to our wrapper struct instead of the pointer stored inside it (as a HANDLE). Closes #13861. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70331 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/printdlg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/msw/printdlg.cpp b/src/msw/printdlg.cpp index fac6fdf743..b0dea0368e 100644 --- a/src/msw/printdlg.cpp +++ b/src/msw/printdlg.cpp @@ -407,7 +407,7 @@ void wxWindowsPrintNativeData::InitializeDevMode(const wxString& printerName, Wi // Step 1: // Allocate a buffer of the correct size. dwNeeded = DocumentProperties( NULL, - printer, // Handle to our printer. + *printer, // Handle to our printer. szPrinterName, // Name of the printer. NULL, // Asking for size, so NULL, // these are not used. @@ -418,7 +418,7 @@ void wxWindowsPrintNativeData::InitializeDevMode(const wxString& printerName, Wi // Step 2: // Get the default DevMode for the printer dwRet = DocumentProperties( NULL, - printer, + *printer, szPrinterName, tempDevMode, // The address of the buffer to fill. NULL, // Not using the input buffer. -- 2.45.2