]> git.saurik.com Git - wxWidgets.git/commitdiff
Correct handle passed to DocumentProperties() in MSW printing code.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 13 Jan 2012 11:32:44 +0000 (11:32 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 13 Jan 2012 11:32:44 +0000 (11:32 +0000)
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

index fac6fdf7438aaffba63abb11dab564ddc7b59720..b0dea0368e0ed6c8fc420c9ecaccafe42ac54d7a 100644 (file)
@@ -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.