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

This commit is contained in:
Alexandre Julliard 2009-12-22 12:45:54 +01:00
parent 1d1f8e2a2c
commit df3e5a8762
2 changed files with 24 additions and 18 deletions
dlls/user32

View File

@ -506,24 +506,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.@)
*/

View File

@ -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)
*/