From 2c4a8d17cd2a8d956e989fd27dd60f5cee49e3fa Mon Sep 17 00:00:00 2001 From: David Webster Date: Tue, 20 Mar 2001 22:45:09 +0000 Subject: [PATCH] Ownerdrawn testing git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/os2/dc.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/os2/dc.cpp b/src/os2/dc.cpp index c1ee5f7a70..5b740a9cc4 100644 --- a/src/os2/dc.cpp +++ b/src/os2/dc.cpp @@ -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 -- 2.45.2