Alexandre Julliard : comctl32/comboex: 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: 4b4c1a0060dcfa17d1a8876dd8cf8cd49cfef53f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4b4c1a0060dcfa17d1a8876dd8cf8cd49cfef53f

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

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

---

 dlls/comctl32/comboex.c |   19 +++++++------------
 1 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c
index 6e90751..e516ea8 100644
--- a/dlls/comctl32/comboex.c
+++ b/dlls/comctl32/comboex.c
@@ -431,18 +431,13 @@ static void COMBOEX_ReSize (const COMBOEX_INFO *infoPtr)
     if (infoPtr->hwndCombo) {
         SendMessageW (infoPtr->hwndCombo, CB_SETITEMHEIGHT, 0, cy);
 	if ( !(infoPtr->flags & CBES_EX_NOSIZELIMIT)) {
-	    RECT comboRect;
-	    if (GetWindowRect(infoPtr->hwndCombo, &comboRect)) {
-		RECT ourRect;
-		if (GetWindowRect(infoPtr->hwndSelf, &ourRect)) {
-		    if (comboRect.bottom > ourRect.bottom) {
-			POINT pt = { ourRect.left, ourRect.top };
-			if (ScreenToClient(infoPtr->hwndSelf, &pt))
-			    MoveWindow( infoPtr->hwndSelf, pt.x, pt.y, ourRect.right - ourRect.left,
-					comboRect.bottom - comboRect.top, FALSE);
-		    }
-		}
-	    }
+	    RECT comboRect, ourRect;
+	    GetWindowRect(infoPtr->hwndCombo, &comboRect);
+            GetWindowRect(infoPtr->hwndSelf, &ourRect);
+            if (comboRect.bottom > ourRect.bottom)
+                SetWindowPos( infoPtr->hwndSelf, 0, 0, 0, ourRect.right - ourRect.left,
+                              comboRect.bottom - comboRect.top,
+                              SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW );
 	}
     }
 }




More information about the wine-cvs mailing list