]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dcprint.cpp
Correct making the newly inserted menu item owner drawn in some cases.
[wxWidgets.git] / src / msw / dcprint.cpp
index 8a0b13d38fc7438fa5898473bcc19c0ebe07a751..d5c6dbc8302c97d9a7daa0ddeb8854b7907eda21 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -83,7 +82,7 @@ wxPrinterDC::wxPrinterDC(const wxString& driver_name,
                          const wxString& device_name,
                          const wxString& file,
                          bool interactive,
-                         int orientation)
+                         wxPrintOrientation orientation)
 {
     m_isInteractive = interactive;
 
@@ -118,8 +117,8 @@ wxPrinterDC::wxPrinterDC(const wxString& driver_name,
     {
         if ( !driver_name.empty() && !device_name.empty() && !file.empty() )
         {
-            m_hDC = (WXHDC) CreateDC(driver_name.wx_str(),
-                                     device_name.wx_str(),
+            m_hDC = (WXHDC) CreateDC(driver_name.t_str(),
+                                     device_name.t_str(),
                                      file.fn_str(),
                                      NULL);
         }
@@ -186,14 +185,14 @@ bool wxPrinterDCImpl::StartDoc(const wxString& message)
 {
     DOCINFO docinfo;
     docinfo.cbSize = sizeof(DOCINFO);
-    docinfo.lpszDocName = message.wx_str();
+    docinfo.lpszDocName = message.t_str();
 
     wxString filename(m_printData.GetFilename());
 
     if (filename.empty())
         docinfo.lpszOutput = NULL;
     else
-        docinfo.lpszOutput = filename.wx_str();
+        docinfo.lpszOutput = filename.t_str();
 
     docinfo.lpszDatatype = NULL;
     docinfo.fwType = 0;
@@ -335,12 +334,14 @@ WXHDC WXDLLEXPORT wxGetPrinterDC(const wxPrintData& printDataConst)
     HDC hDC = ::CreateDC
                 (
                     NULL,               // no driver name as we use device name
-                    deviceName.wx_str(),
+                    deviceName.t_str(),
                     NULL,               // unused
                     static_cast<DEVMODE *>(lockDevMode.Get())
                 );
     if ( !hDC )
-        wxLogLastError(_T("CreateDC(printer)"));
+    {
+        wxLogLastError(wxT("CreateDC(printer)"));
+    }
 
     return (WXHDC) hDC;
 #endif // PostScript/Windows printing
@@ -365,7 +366,7 @@ bool DrawBitmapUsingStretchDIBits(HDC hdc,
     DIBSECTION ds;
     if ( !::GetObject(dib.GetHandle(), sizeof(ds), &ds) )
     {
-        wxLogLastError(_T("GetObject(DIBSECTION)"));
+        wxLogLastError(wxT("GetObject(DIBSECTION)"));
 
         return false;
     }
@@ -399,7 +400,7 @@ void wxPrinterDCImpl::DoDrawBitmap(const wxBitmap& bmp,
                                wxCoord x, wxCoord y,
                                bool useMask)
 {
-    wxCHECK_RET( bmp.Ok(), _T("invalid bitmap in wxPrinterDC::DrawBitmap") );
+    wxCHECK_RET( bmp.IsOk(), wxT("invalid bitmap in wxPrinterDC::DrawBitmap") );
 
     int width = bmp.GetWidth(),
         height = bmp.GetHeight();
@@ -422,7 +423,7 @@ bool wxPrinterDCImpl::DoBlit(wxCoord xdest, wxCoord ydest,
                          wxCoord width, wxCoord height,
                          wxDC *source,
                          wxCoord WXUNUSED(xsrc), wxCoord WXUNUSED(ysrc),
-                         int WXUNUSED(rop), bool useMask,
+                         wxRasterOperationMode WXUNUSED(rop), bool useMask,
                          wxCoord WXUNUSED(xsrcMask), wxCoord WXUNUSED(ysrcMask))
 {
     wxDCImpl *impl = source->GetImpl();