Commit df3e5a87 authored by Alexandre Julliard's avatar Alexandre Julliard

user32: Reimplement MapWindowPoints16 and move it to wnd16.c.

parent 1d1f8e2a
......@@ -507,24 +507,6 @@ static void WINPOS_GetWinOffset( HWND hwndFrom, HWND hwndTo, POINT *offset )
/*******************************************************************
* MapWindowPoints (USER.258)
*/
void WINAPI MapWindowPoints16( HWND16 hwndFrom, HWND16 hwndTo,
LPPOINT16 lppt, UINT16 count )
{
POINT offset;
WINPOS_GetWinOffset( WIN_Handle32(hwndFrom), WIN_Handle32(hwndTo), &offset );
while (count--)
{
lppt->x += offset.x;
lppt->y += offset.y;
lppt++;
}
}
/*******************************************************************
* MapWindowPoints (USER32.@)
*/
INT WINAPI MapWindowPoints( HWND hwndFrom, HWND hwndTo, LPPOINT lppt, UINT count )
......
......@@ -1260,6 +1260,30 @@ HWND16 WINAPI GetOpenClipboardWindow16(void)
}
/*******************************************************************
* MapWindowPoints (USER.258)
*/
void WINAPI MapWindowPoints16( HWND16 hwndFrom, HWND16 hwndTo, LPPOINT16 lppt, UINT16 count )
{
POINT buffer[8], *ppt = buffer;
UINT i;
if (count > 8) ppt = HeapAlloc( GetProcessHeap(), 0, count * sizeof(*ppt) );
for (i = 0; i < count; i++)
{
ppt[i].x = lppt[i].x;
ppt[i].y = lppt[i].y;
}
MapWindowPoints( WIN_Handle32(hwndFrom), WIN_Handle32(hwndTo), ppt, count );
for (i = 0; i < count; i++)
{
lppt[i].x = ppt[i].x;
lppt[i].y = ppt[i].y;
}
if (ppt != buffer) HeapFree( GetProcessHeap(), 0, ppt );
}
/**************************************************************************
* BeginDeferWindowPos (USER.259)
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment