+ const wxFont* pFontToUse = pTheFont;
+ HPS hPs;
+
+ hPs = ::WinGetPS(GetHwnd());
+/*
+// TODO: Will have to play with fonts later
+
+ if (!pFontToUse)
+ pFontToUse = &m_font;
+
+ HFONT hFnt = 0;
+ HFONT hFfontOld = 0;
+
+ if (pFontToUse && pFontToUse->Ok())
+ {
+ ::GpiCreateLog
+ hFnt = (HFONT)((wxFont *)pFontToUse)->GetResourceHandle(); // const_cast
+ if (hFnt)
+ hFontOld = (HFONT)SelectObject(dc,fnt);
+ }
+
+ SIZE sizeRect;
+ TEXTMETRIC tm;
+ GetTextExtentPoint(dc, string, (int)string.Length(), &sizeRect);
+ GetTextMetrics(dc, &tm);
+
+ if ( fontToUse && fnt && hfontOld )
+ SelectObject(dc, hfontOld);
+
+ ReleaseDC(hWnd, dc);
+
+ if ( x )
+ *x = sizeRect.cx;
+ if ( y )
+ *y = sizeRect.cy;
+ if ( descent )
+ *descent = tm.tmDescent;
+ if ( externalLeading )
+ *externalLeading = tm.tmExternalLeading;
+*/
+ ::WinReleasePS(hPs);