]> git.saurik.com Git - wxWidgets.git/commitdiff
Ownerdrawn testing
authorDavid Webster <Dave.Webster@bhmi.com>
Tue, 20 Mar 2001 22:45:09 +0000 (22:45 +0000)
committerDavid Webster <Dave.Webster@bhmi.com>
Tue, 20 Mar 2001 22:45:09 +0000 (22:45 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/os2/dc.cpp

index c1ee5f7a702a3c6890d73abf5c71b492950b3081..5b740a9cc480e5490c4b25d729fc71b49e331d30 100644 (file)
@@ -1168,6 +1168,9 @@ void wxDC::DoGetTextExtent(
     ERRORID                         vErrorCode; // last error id code
     wxFont*                         pFontToUse = (wxFont*)pTheFont;
 
+    char                            zMsg[128]; // DEBUG
+    wxString                        sError;
+
     if (!pFontToUse)
         pFontToUse = (wxFont*)&m_font;
     l = rsString.length();
@@ -1185,6 +1188,13 @@ void wxDC::DoGetTextExtent(
     if(!bRc)
     {
        vErrorCode = ::WinGetLastError(wxGetInstance());
+       sError = wxPMErrorToStr(vErrorCode);
+       // DEBUG
+       sprintf(zMsg, "GpiQueryTextBox for %s: failed with Error: %x - %s", pStr, vErrorCode, sError.c_str());
+       (void)wxMessageBox( "wxWindows Menu sample"
+                          ,zMsg
+                          ,wxICON_INFORMATION
+                         );
     }
 
     vPtMin.x = avPoint[0].x;
@@ -1198,6 +1208,17 @@ void wxDC::DoGetTextExtent(
         if(vPtMax.x < avPoint[i].x) vPtMax.x = avPoint[i].x;
         if(vPtMax.y < avPoint[i].y) vPtMax.y = avPoint[i].y;
     }
+#if 0
+    sprintf(zMsg, "Extents for %s, are: Minx: %ld, Miny: %ld, Maxx: %ld, Maxy: %ld", vPtMin.x
+                                                                                   , vPtMin.y
+                                                                                   , vPtMax.x
+                                                                                   , vPtMax.y
+                                                                                  );
+    (void)wxMessageBox( "wxWindows Menu sample"
+                       ,zMsg
+                       ,wxICON_INFORMATION
+                      );
+#endif
     ::GpiQueryFontMetrics( m_hPS
                           ,sizeof(FONTMETRICS)
                           ,&vFM