]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/dc.cpp
final revision
[wxWidgets.git] / src / os2 / dc.cpp
index 09fe982e4589d67d2ff18aa6d54227179b5548c7..11d9169319780e333c92e8f416b7ebc133c5ab5b 100644 (file)
     #include "wx/msgdlg.h"
     #include "wx/dcprint.h"
     #include "wx/statusbr.h"
+    #include "wx/module.h"
 #endif
 
-#include "wx/module.h"
-
 #include <string.h>
 
 #include "wx/os2/private.h"
@@ -657,7 +656,7 @@ void wxDC::DoDrawLine(
     }
     else
     {
-        if (m_vSelectedBitmap != wxNullBitmap)
+        if (m_vSelectedBitmap.Ok())
         {
             m_vRclPaint.yTop = m_vSelectedBitmap.GetHeight();
             m_vRclPaint.xRight = m_vSelectedBitmap.GetWidth();
@@ -987,7 +986,7 @@ void wxDC::DoDrawRectangle(
         vY = OS2Y(vY,vHeight);
     else
     {
-        if (m_vSelectedBitmap != wxNullBitmap)
+        if (m_vSelectedBitmap.Ok())
         {
             m_vRclPaint.yTop = m_vSelectedBitmap.GetHeight();
             m_vRclPaint.xRight = m_vSelectedBitmap.GetWidth();
@@ -1077,7 +1076,7 @@ void wxDC::DoDrawRoundedRectangle(
         vY = OS2Y(vY,vHeight);
     else
     {
-        if (m_vSelectedBitmap != wxNullBitmap)
+        if (m_vSelectedBitmap.Ok())
         {
             m_vRclPaint.yTop = m_vSelectedBitmap.GetHeight();
             m_vRclPaint.xRight = m_vSelectedBitmap.GetWidth();
@@ -1744,7 +1743,7 @@ void wxDC::DrawAnyText( const wxString& rsText,
     }
     else
     {
-        if (m_vSelectedBitmap != wxNullBitmap)
+        if (m_vSelectedBitmap.Ok())
         {
             m_vRclPaint.yTop = m_vSelectedBitmap.GetHeight();
             m_vRclPaint.xRight = m_vSelectedBitmap.GetWidth();
@@ -1754,12 +1753,10 @@ void wxDC::DrawAnyText( const wxString& rsText,
             vPtlStart.y = vY;
     }
 
-    PCH pzStr = (PCH)rsText.c_str();
-
     ::GpiMove(m_hPS, &vPtlStart);
     lHits = ::GpiCharString( m_hPS
                             ,rsText.length()
-                            ,pzStr
+                            ,rsText.wx_str()
                            );
     if (lHits != GPI_OK)
     {
@@ -2179,7 +2176,7 @@ void wxDC::DoGetTextExtent(
     //
     bRc = ::GpiQueryTextBox( m_hPS
                             ,l
-                            ,(PCH)rsString.c_str()
+                            ,(char *)rsString.wx_str()
                             ,TXTBOX_COUNT // return maximum information
                             ,avPoint      // array of coordinates points
                            );