Author: fireball
Date: Mon May 22 23:07:59 2006
New Revision: 21978
URL:
http://svn.reactos.ru/svn/reactos?rev=21978&view=rev
Log:
- Implement GetTabbedTextExtentA(), based on implementation from Wine (trunk). Reduces
number of failures in "user32_winetest.exe text" from 84 to 64.
Modified:
trunk/reactos/dll/win32/user32/windows/font.c
Modified: trunk/reactos/dll/win32/user32/windows/font.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/user32/windows/fo…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/font.c (original)
+++ trunk/reactos/dll/win32/user32/windows/font.c Mon May 22 23:07:59 2006
@@ -161,7 +161,7 @@
/*
- * @unimplemented
+ * @implemented
*/
DWORD
STDCALL
@@ -172,8 +172,19 @@
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;
}