From 767b35a56f556e3ae3c85c00367aff64cb6e6839 Mon Sep 17 00:00:00 2001
From: Dimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Date: Tue, 17 May 2005 16:03:25 +0000
Subject: [PATCH] applied patch #1185523: "Replace GetTextExtentPoint with
 GetTextExtentPoint32"

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 src/msw/dc.cpp       | 2 +-
 src/msw/listbox.cpp  | 4 ++--
 src/msw/metafile.cpp | 2 +-
 src/msw/ownerdrw.cpp | 2 +-
 src/msw/tooltip.cpp  | 4 ++--
 src/msw/window.cpp   | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp
index 86e464506c..63f940e5a9 100644
--- a/src/msw/dc.cpp
+++ b/src/msw/dc.cpp
@@ -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)
diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp
index 5f27c25a6e..eafc7c1909 100644
--- a/src/msw/listbox.cpp
+++ b/src/msw/listbox.cpp
@@ -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;
diff --git a/src/msw/metafile.cpp b/src/msw/metafile.cpp
index ec6f66f44f..7e48d2c979 100644
--- a/src/msw/metafile.cpp
+++ b/src/msw/metafile.cpp
@@ -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);
diff --git a/src/msw/ownerdrw.cpp b/src/msw/ownerdrw.cpp
index e7a3ec6453..31b31ac115 100644
--- a/src/msw/ownerdrw.cpp
+++ b/src/msw/ownerdrw.cpp
@@ -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
diff --git a/src/msw/tooltip.cpp b/src/msw/tooltip.cpp
index 71ef1f714e..8acb197dc3 100644
--- a/src/msw/tooltip.cpp
+++ b/src/msw/tooltip.cpp
@@ -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,
diff --git a/src/msw/window.cpp b/src/msw/window.cpp
index 3d419c94d1..950b149b59 100644
--- a/src/msw/window.cpp
+++ b/src/msw/window.cpp
@@ -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 )
-- 
2.47.2