Alexandre Julliard : comctl32/propsheet: Fix incorrect use of the ScreenToClient function.

Alexandre Julliard julliard at winehq.org
Tue Oct 5 12:03:11 CDT 2010


Module: wine
Branch: master
Commit: a37e5975dc9bfb93d069dc39370f172b965507a2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a37e5975dc9bfb93d069dc39370f172b965507a2

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Oct  5 14:04:01 2010 +0200

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

---

 dlls/comctl32/propsheet.c |   19 +++++--------------
 1 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index e25db1d..f711399 100644
--- a/dlls/comctl32/propsheet.c
+++ b/dlls/comctl32/propsheet.c
@@ -1074,18 +1074,13 @@ static PADDING_INFO PROPSHEET_GetPaddingInfo(HWND hwndDlg)
 {
   HWND hwndTab = GetDlgItem(hwndDlg, IDC_TABCONTROL);
   RECT rcTab;
-  POINT tl;
   PADDING_INFO padding;
 
   GetWindowRect(hwndTab, &rcTab);
+  MapWindowPoints( 0, hwndDlg, (POINT *)&rcTab, 2 );
 
-  tl.x = rcTab.left;
-  tl.y = rcTab.top;
-
-  ScreenToClient(hwndDlg, &tl);
-
-  padding.x = tl.x;
-  padding.y = tl.y;
+  padding.x = rcTab.left;
+  padding.y = rcTab.top;
 
   return padding;
 }
@@ -1131,21 +1126,17 @@ static PADDING_INFO PROPSHEET_GetPaddingInfoWizard(HWND hwndDlg, const PropSheet
 
   hwndControl = GetDlgItem(hwndDlg, idButton);
   GetWindowRect(hwndControl, &rc);
-
+  MapWindowPoints( 0, hwndDlg, (POINT *)&rc, 2 );
   ptButton.x = rc.left;
   ptButton.y = rc.top;
 
-  ScreenToClient(hwndDlg, &ptButton);
-
   /* Line */
   hwndControl = GetDlgItem(hwndDlg, IDC_SUNKEN_LINE);
   GetWindowRect(hwndControl, &rc);
-
+  MapWindowPoints( 0, hwndDlg, (POINT *)&rc, 2 );
   ptLine.x = rc.left;
   ptLine.y = rc.bottom;
 
-  ScreenToClient(hwndDlg, &ptLine);
-
   padding.y = ptButton.y - ptLine.y;
 
   if (padding.y < 0)




More information about the wine-cvs mailing list