]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dcprint.cpp
added some utils (tex2rtf, helpgen, makegen) to make system
[wxWidgets.git] / src / msw / dcprint.cpp
index 4344e5977296f0c1fe0705104f110a3d0eb63b29..35c9be54be32ce76eb13192b1646ca4b576b6857 100644 (file)
@@ -38,9 +38,7 @@
 #include <print.h>
 #endif
 
-#if !USE_SHARED_LIBRARY
 IMPLEMENT_CLASS(wxPrinterDC, wxDC)
-#endif
 
 // This form is deprecated
 wxPrinterDC::wxPrinterDC(const wxString& driver_name, const wxString& device_name, const wxString& file, bool interactive, int orientation)
@@ -249,12 +247,13 @@ static bool wxGetDefaultDeviceName(wxString& deviceName, wxString& portName)
         lpszDriverName = (LPSTR)lpDevNames + lpDevNames->wDriverOffset;
         lpszDeviceName = (LPSTR)lpDevNames + lpDevNames->wDeviceOffset;
         lpszPortName   = (LPSTR)lpDevNames + lpDevNames->wOutputOffset;
-        GlobalUnlock(pd.hDevNames);
-        GlobalFree(pd.hDevNames);
-        pd.hDevNames=NULL;
 
         deviceName = lpszDeviceName;
         portName = lpszPortName;
+
+        GlobalUnlock(pd.hDevNames);
+        GlobalFree(pd.hDevNames);
+        pd.hDevNames=NULL;
     }
 
     if (pd.hDevMode)