comctl32: rebar: Implement CCS_NORESIZE style. [sorry, try 2,
PATCH 2/2]
Misha Koshelev
mk144210 at bcm.tmc.edu
Sat Feb 17 00:23:24 CST 2007
Reposted because of change in comment with direct MSDN quote in
conformance test patch (as this patch removes the todo_wine statements
from the conformance test).
This patch implements the CCS_NORESIZE style for rebar. This fixes bug
#1115.
Changelog:
* comctl32: rebar: Implement CCS_NORESIZE style.
-------------- next part --------------
From f3a396402b6878741f0e466b2ead3b7cfcc7b6ec Mon Sep 17 00:00:00 2001
From: Misha Koshelev <mk144210 at bcm.tmc.edu>
Date: Sat, 17 Feb 2007 00:19:14 -0600
Subject: comctl32: rebar: Implement CCS_NORESIZE style.
---
dlls/comctl32/rebar.c | 7 ++++++-
dlls/comctl32/tests/rebar.c | 10 +++++-----
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c
index 9550eb5..4b2d2ab 100644
--- a/dlls/comctl32/rebar.c
+++ b/dlls/comctl32/rebar.c
@@ -32,7 +32,6 @@
* - RBS_FIXEDORDER
* - RBS_REGISTERDROP
* - RBS_TOOLTIPS
- * - CCS_NORESIZE
* - CCS_NOMOVEX
* - CCS_NOMOVEY
* Messages:
@@ -1184,6 +1183,12 @@ REBAR_ForceResize (REBAR_INFO *infoPtr)
infoPtr->calcSize.cx, infoPtr->calcSize.cy,
rc.right, rc.bottom);
+ /* If CCS_NORESIZE style is set, do not resize the rebar */
+ if (infoPtr->dwStyle & CCS_NORESIZE) {
+ TRACE("CCS_NORESIZE style, skipping rebar resize\n");
+ return;
+ }
+
/* If we need to shrink client, then skip size test */
if ((infoPtr->calcSize.cy >= rc.bottom) &&
(infoPtr->calcSize.cx >= rc.right)) {
diff --git a/dlls/comctl32/tests/rebar.c b/dlls/comctl32/tests/rebar.c
index 1613396..e4142bb 100644
--- a/dlls/comctl32/tests/rebar.c
+++ b/dlls/comctl32/tests/rebar.c
@@ -152,10 +152,10 @@ static void ccs_noresize_test()
ok(GetWindowRect(hRebar, &rectBeforeResize), "GetWindowRect failed %d\n", GetLastError());
ok(ScreenToClient(hMainWnd, (LPPOINT)&rectBeforeResize), "ScreenToClient failed\n");
ok(ScreenToClient(hMainWnd, (LPPOINT)&rectBeforeResize.right), "ScreenToClient failed\n");
- todo_wine ok(rectBeforeResize.left == 0 &&
- rectBeforeResize.top == 0 &&
- rectBeforeResize.right == 0 &&
- rectBeforeResize.bottom == 0,
+ ok(rectBeforeResize.left == 0 &&
+ rectBeforeResize.top == 0 &&
+ rectBeforeResize.right == 0 &&
+ rectBeforeResize.bottom == 0,
"Rebar position should be (0,0)-(0,0) not (%d,%d)-(%d,%d)\n",
rectBeforeResize.left, rectBeforeResize.top, rectBeforeResize.right, rectBeforeResize.bottom);
@@ -186,7 +186,7 @@ static void ccs_noresize_test()
ok(ScreenToClient(hMainWnd, (LPPOINT)&rectAfterResize.right), "ScreenToClient failed\n");
/* Rebar should be exactly the same size as we requested */
- todo_wine ok(EqualRect(&rectBeforeResize, &rectAfterResize), "Rebar position should be (%d,%d)-(%d,%d) not (%d,%d)-(%d,%d)\n", rectBeforeResize.left, rectBeforeResize.top, rectBeforeResize.right, rectBeforeResize.bottom, rectAfterResize.left, rectAfterResize.top, rectAfterResize.right, rectAfterResize.bottom);
+ ok(EqualRect(&rectBeforeResize, &rectAfterResize), "Rebar position should be (%d,%d)-(%d,%d) not (%d,%d)-(%d,%d)\n", rectBeforeResize.left, rectBeforeResize.top, rectBeforeResize.right, rectBeforeResize.bottom, rectAfterResize.left, rectAfterResize.top, rectAfterResize.right, rectAfterResize.bottom);
DestroyWindow(hRebar);
}
--
1.4.1
More information about the wine-patches
mailing list