Alexandre Julliard : comctl32/ipaddress: Fix incorrect use of the ScreenToClient function.
Alexandre Julliard
julliard at winehq.org
Tue Oct 5 12:03:10 CDT 2010
Module: wine
Branch: master
Commit: a10441d67aa45943f24cee035570cbdccd593890
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a10441d67aa45943f24cee035570cbdccd593890
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Oct 5 14:03:41 2010 +0200
comctl32/ipaddress: Fix incorrect use of the ScreenToClient function.
---
dlls/comctl32/ipaddress.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/dlls/comctl32/ipaddress.c b/dlls/comctl32/ipaddress.c
index 03b8d1c..1f41f91 100644
--- a/dlls/comctl32/ipaddress.c
+++ b/dlls/comctl32/ipaddress.c
@@ -149,7 +149,6 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc)
{
static const WCHAR dotW[] = { '.', 0 };
RECT rect, rcPart;
- POINT pt;
COLORREF bgCol, fgCol;
int i;
@@ -173,13 +172,11 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc)
for (i = 0; i < 3; i++) {
GetWindowRect (infoPtr->Part[i].EditHwnd, &rcPart);
- pt.x = rcPart.right;
- ScreenToClient(infoPtr->Self, &pt);
- rect.left = pt.x;
+ MapWindowPoints( 0, infoPtr->Self, (POINT *)&rcPart, 2 );
+ rect.left = rcPart.right;
GetWindowRect (infoPtr->Part[i+1].EditHwnd, &rcPart);
- pt.x = rcPart.left;
- ScreenToClient(infoPtr->Self, &pt);
- rect.right = pt.x;
+ MapWindowPoints( 0, infoPtr->Self, (POINT *)&rcPart, 2 );
+ rect.right = rcPart.left;
DrawTextW(hdc, dotW, 1, &rect, DT_SINGLELINE | DT_CENTER | DT_BOTTOM);
}
More information about the wine-cvs
mailing list