From 612e2ff4df27cbea0d69a16bca104a12efde115c Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Mon, 22 May 2006 19:07:59 +0000 Subject: [PATCH] - Implement GetTabbedTextExtentA(), based on implementation from Wine (trunk). Reduces number of failures in "user32_winetest.exe text" from 84 to 64. svn path=/trunk/; revision=21978 --- reactos/dll/win32/user32/windows/font.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/reactos/dll/win32/user32/windows/font.c b/reactos/dll/win32/user32/windows/font.c index b7adac27d3f..ce5c5a4f60a 100644 --- a/reactos/dll/win32/user32/windows/font.c +++ b/reactos/dll/win32/user32/windows/font.c @@ -161,7 +161,7 @@ TabbedTextOutW( /* - * @unimplemented + * @implemented */ DWORD STDCALL @@ -172,8 +172,19 @@ GetTabbedTextExtentA( int nTabPositions, CONST LPINT lpnTabStopPositions) { - UNIMPLEMENTED; - return 0; + LONG ret; + DWORD len = MultiByteToWideChar(CP_ACP, 0, lpString, nCount, NULL, 0); + LPWSTR strW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + + if (!strW) + return 0; + MultiByteToWideChar(CP_ACP, 0, lpString, nCount, strW, len); + + ret = GetTabbedTextExtentW(hDC, strW, len, nTabPositions, + lpnTabStopPositions); + + HeapFree(GetProcessHeap(), 0, strW); + return ret; }