]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/printdlg.cpp
added Thai/CP874 support for MSW
[wxWidgets.git] / src / msw / printdlg.cpp
index c64b054463cb9e7727672e6a0f5871002f1f9f04..2818820a0ae822a43cc7fdadaba49af40f46d447 100644 (file)
@@ -152,9 +152,10 @@ bool wxWindowsPrintNativeData::TransferTo( wxPrintData &data )
     HGLOBAL hDevNames = (HGLOBAL)(DWORD) m_devNames;
 
     if (!hDevMode)
+    {
         return false;
-
-    if ( hDevMode )
+    }
+    else
     {
         LPDEVMODE devMode = (LPDEVMODE)GlobalLock(hDevMode);
 
@@ -221,7 +222,7 @@ bool wxWindowsPrintNativeData::TransferTo( wxPrintData &data )
                 data.SetPaperId( wxPAPER_NONE );
                 data.SetPaperSize( wxSize(0,0) );
                 m_customWindowsPaperId = 0;
-                
+
                 GlobalUnlock(hDevMode);
                 return false;
             }
@@ -602,7 +603,7 @@ int wxWindowsPrintDialog::ShowModal()
 
     pd->hwndOwner = 0;
 
-    if ( ret != false && (pd->hDC) )
+    if ( ret && (pd->hDC) )
     {
         wxPrinterDC *pdc = new wxPrinterDC( (WXHDC) pd->hDC );
         m_printerDC = pdc;