- 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
This commit is contained in:
Aleksey Bragin 2006-05-22 19:07:59 +00:00
parent d778de3578
commit 612e2ff4df

View file

@ -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;
}