Commit 4b4c1a00 authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent d1f8eb49
...@@ -431,18 +431,13 @@ static void COMBOEX_ReSize (const COMBOEX_INFO *infoPtr) ...@@ -431,18 +431,13 @@ static void COMBOEX_ReSize (const COMBOEX_INFO *infoPtr)
if (infoPtr->hwndCombo) { if (infoPtr->hwndCombo) {
SendMessageW (infoPtr->hwndCombo, CB_SETITEMHEIGHT, 0, cy); SendMessageW (infoPtr->hwndCombo, CB_SETITEMHEIGHT, 0, cy);
if ( !(infoPtr->flags & CBES_EX_NOSIZELIMIT)) { if ( !(infoPtr->flags & CBES_EX_NOSIZELIMIT)) {
RECT comboRect; RECT comboRect, ourRect;
if (GetWindowRect(infoPtr->hwndCombo, &comboRect)) { GetWindowRect(infoPtr->hwndCombo, &comboRect);
RECT ourRect; GetWindowRect(infoPtr->hwndSelf, &ourRect);
if (GetWindowRect(infoPtr->hwndSelf, &ourRect)) { if (comboRect.bottom > ourRect.bottom)
if (comboRect.bottom > ourRect.bottom) { SetWindowPos( infoPtr->hwndSelf, 0, 0, 0, ourRect.right - ourRect.left,
POINT pt = { ourRect.left, ourRect.top }; comboRect.bottom - comboRect.top,
if (ScreenToClient(infoPtr->hwndSelf, &pt)) SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW );
MoveWindow( infoPtr->hwndSelf, pt.x, pt.y, ourRect.right - ourRect.left,
comboRect.bottom - comboRect.top, FALSE);
}
}
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment