comctl32/ipaddress: Fix incorrect use of the ScreenToClient function.

This commit is contained in:
Alexandre Julliard 2010-10-05 14:03:41 +02:00
parent 96ed854d35
commit a10441d67a
1 changed files with 4 additions and 7 deletions

View File

@ -149,7 +149,6 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc)
{ {
static const WCHAR dotW[] = { '.', 0 }; static const WCHAR dotW[] = { '.', 0 };
RECT rect, rcPart; RECT rect, rcPart;
POINT pt;
COLORREF bgCol, fgCol; COLORREF bgCol, fgCol;
int i; int i;
@ -173,13 +172,11 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc)
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {
GetWindowRect (infoPtr->Part[i].EditHwnd, &rcPart); GetWindowRect (infoPtr->Part[i].EditHwnd, &rcPart);
pt.x = rcPart.right; MapWindowPoints( 0, infoPtr->Self, (POINT *)&rcPart, 2 );
ScreenToClient(infoPtr->Self, &pt); rect.left = rcPart.right;
rect.left = pt.x;
GetWindowRect (infoPtr->Part[i+1].EditHwnd, &rcPart); GetWindowRect (infoPtr->Part[i+1].EditHwnd, &rcPart);
pt.x = rcPart.left; MapWindowPoints( 0, infoPtr->Self, (POINT *)&rcPart, 2 );
ScreenToClient(infoPtr->Self, &pt); rect.right = rcPart.left;
rect.right = pt.x;
DrawTextW(hdc, dotW, 1, &rect, DT_SINGLELINE | DT_CENTER | DT_BOTTOM); DrawTextW(hdc, dotW, 1, &rect, DT_SINGLELINE | DT_CENTER | DT_BOTTOM);
} }