comctl32: comboex WM_SIZE fix
Felix Nawothnig
felix.nawothnig at t-online.de
Fri May 6 07:31:14 CDT 2005
This fixes a visual glitch in the ComboBoxEx example on MSDN (white box
under the ComboBox caused by SetWindowPos(CBEX...) setting it's height
to 120px) and removes a redundant resize on WM_SIZE. (already done in
WM_WINDOWPOSCHANGE - microsoft doesn't do it either, verified against
native trace)
ChangeLog:
- Ignore requested height on WM_WINDOWPOSCHANGING
- Remove redundant resize on WM_SIZE
-------------- next part --------------
Index: comboex.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/comboex.c,v
retrieving revision 1.83
diff -u -r1.83 comboex.c
--- comboex.c 4 May 2005 10:37:17 -0000 1.83
+++ comboex.c 6 May 2005 12:18:53 -0000
@@ -1619,22 +1619,10 @@
}
-static LRESULT COMBOEX_Size (COMBOEX_INFO *infoPtr, INT width, INT height)
-{
- TRACE("(width=%d, height=%d)\n", width, height);
-
- MoveWindow (infoPtr->hwndCombo, 0, 0, width, height, TRUE);
-
- COMBOEX_AdjustEditPos (infoPtr);
-
- return 0;
-}
-
-
static LRESULT COMBOEX_WindowPosChanging (COMBOEX_INFO *infoPtr, WINDOWPOS *wp)
{
RECT cbx_wrect, cbx_crect, cb_wrect;
- INT width, height;
+ INT width;
GetWindowRect (infoPtr->hwndSelf, &cbx_wrect);
GetClientRect (infoPtr->hwndSelf, &cbx_crect);
@@ -1662,10 +1650,10 @@
GetWindowRect (infoPtr->hwndCombo, &cb_wrect);
/* height is combo window height plus border width of comboex */
- height = (cb_wrect.bottom-cb_wrect.top)
+ wp->cy = (cb_wrect.bottom-cb_wrect.top)
+ (cbx_wrect.bottom-cbx_wrect.top)
- (cbx_crect.bottom-cbx_crect.top);
- if (wp->cy < height) wp->cy = height;
+
if (infoPtr->hwndEdit) {
COMBOEX_AdjustEditPos (infoPtr);
InvalidateRect (infoPtr->hwndCombo, 0, TRUE);
@@ -2257,9 +2245,6 @@
case WM_NOTIFYFORMAT:
return COMBOEX_NotifyFormat (infoPtr, lParam);
- case WM_SIZE:
- return COMBOEX_Size (infoPtr, LOWORD(lParam), HIWORD(lParam));
-
case WM_WINDOWPOSCHANGING:
return COMBOEX_WindowPosChanging (infoPtr, (WINDOWPOS *)lParam);
More information about the wine-patches
mailing list