]> git.saurik.com Git - wxWidgets.git/commitdiff
applied patch #1185523: "Replace GetTextExtentPoint with GetTextExtentPoint32"
authorDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Tue, 17 May 2005 16:03:25 +0000 (16:03 +0000)
committerDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Tue, 17 May 2005 16:03:25 +0000 (16:03 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/dc.cpp
src/msw/listbox.cpp
src/msw/metafile.cpp
src/msw/ownerdrw.cpp
src/msw/tooltip.cpp
src/msw/window.cpp

index 86e464506cad2c5edca2fff43352aee87f665a88..63f940e5a9509ebe86f59d486a1268dccc410342 100644 (file)
@@ -1635,7 +1635,7 @@ void wxDC::DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
     SIZE sizeRect;
     TEXTMETRIC tm;
 
-    GetTextExtentPoint(GetHdc(), string, string.length(), &sizeRect);
+    ::GetTextExtentPoint32(GetHdc(), string, string.length(), &sizeRect);
     GetTextMetrics(GetHdc(), &tm);
 
     if (x)
index 5f27c25a6e484890c7c1a63e4121c7daef822220..eafc7c1909a611022b5c1d88e1e781f933bb0858 100644 (file)
@@ -622,7 +622,7 @@ void wxListBox::SetHorizontalExtent(const wxString& s)
 
         GetTextMetrics(dc, &lpTextMetric);
         SIZE extentXY;
-        ::GetTextExtentPoint(dc, (LPTSTR) (const wxChar *)s, s.Length(), &extentXY);
+        ::GetTextExtentPoint32(dc, (LPTSTR) (const wxChar *)s, s.Length(), &extentXY);
         int extentX = (int)(extentXY.cx + lpTextMetric.tmAveCharWidth);
 
         if (oldFont)
@@ -646,7 +646,7 @@ void wxListBox::SetHorizontalExtent(const wxString& s)
         {
             wxString str = GetString(i);
             SIZE extentXY;
-            ::GetTextExtentPoint(dc, str.c_str(), str.length(), &extentXY);
+            ::GetTextExtentPoint32(dc, str.c_str(), str.length(), &extentXY);
             int extentX = (int)(extentXY.cx + lpTextMetric.tmAveCharWidth);
             if (extentX > largestExtent)
                 largestExtent = extentX;
index ec6f66f44f91e8e50cc1f29d5babf88721e3ee80..7e48d2c979a0fff0da6a65e9166ef2cc994ca7bd 100644 (file)
@@ -232,7 +232,7 @@ void wxMetafileDC::GetTextExtent(const wxString& string, long *x, long *y,
 
     SIZE sizeRect;
     TEXTMETRIC tm;
-    GetTextExtentPoint(dc, WXSTRINGCAST string, wxStrlen(WXSTRINGCAST string), &sizeRect);
+    ::GetTextExtentPoint32(dc, WXSTRINGCAST string, wxStrlen(WXSTRINGCAST string), &sizeRect);
     GetTextMetrics(dc, &tm);
 
     ReleaseDC(NULL, dc);
index e7a3ec64537525a2ab50d909fc9f754d9a9494f8..31b31ac115b95e5aba7e1352643a1e9106ccc398 100644 (file)
@@ -312,7 +312,7 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
   xText += 3; // separate text from the highlight rectangle
 
   SIZE sizeRect;
-  GetTextExtentPoint32(hdc,strMenuText.c_str(), strMenuText.Length(),&sizeRect);
+  ::GetTextExtentPoint32(hdc, strMenuText.c_str(), strMenuText.Length(), &sizeRect);
   ::DrawState(hdc, NULL, NULL,
               (LPARAM)strMenuText.c_str(), strMenuText.length(),
               xText, rc.y + (int) ((rc.GetHeight()-sizeRect.cy)/2.0), // centre text vertically
index 71ef1f714e97674299f79425930464db6435f427..8acb197dc38e69cf031c8f928e8d9892a3513c2d 100644 (file)
@@ -317,9 +317,9 @@ void wxToolTip::Add(WXHWND hWnd)
                 }
 
                 SIZE sz;
-                if ( !GetTextExtentPoint(hdc, m_text, index, &sz) )
+                if ( !::GetTextExtentPoint32(hdc, m_text, index, &sz) )
                 {
-                    wxLogLastError(wxT("GetTextExtentPoint"));
+                    wxLogLastError(wxT("GetTextExtentPoint32"));
                 }
 
                 SendTooltipMessage(GetToolTipCtrl(), TTM_SETMAXTIPWIDTH,
index 3d419c94d1f5303f99b30df37fd2d318099aec10..950b149b590be30ab5025118b82f39a8500edf88 100644 (file)
@@ -1797,7 +1797,7 @@ void wxWindowMSW::GetTextExtent(const wxString& string,
 
     SIZE sizeRect;
     TEXTMETRIC tm;
-    GetTextExtentPoint(hdc, string, string.length(), &sizeRect);
+    ::GetTextExtentPoint32(hdc, string, string.length(), &sizeRect);
     GetTextMetrics(hdc, &tm);
 
     if ( x )