[PATCH] comctl32: Return the number of visible months for MCM_GETMONTHDELTA
Andrew Eikum
aeikum at codeweavers.com
Thu Aug 29 14:57:48 CDT 2013
---
dlls/comctl32/monthcal.c | 5 ++---
dlls/comctl32/tests/monthcal.c | 3 +++
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c
index ef2ad68..84a01da 100644
--- a/dlls/comctl32/monthcal.c
+++ b/dlls/comctl32/monthcal.c
@@ -123,7 +123,6 @@ typedef struct
int width_increment;
INT delta; /* scroll rate; # of months that the */
/* control moves when user clicks a scroll button */
- int visible; /* # of months visible */
int firstDay; /* Start month calendar with firstDay's day,
stored in SYSTEMTIME format */
BOOL firstDaySet; /* first week day differs from locale defined */
@@ -1302,8 +1301,8 @@ MONTHCAL_GetMonthDelta(const MONTHCAL_INFO *infoPtr)
if(infoPtr->delta)
return infoPtr->delta;
- else
- return infoPtr->visible;
+
+ return MONTHCAL_GetMonthRange(infoPtr, GMR_VISIBLE, NULL);
}
diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c
index 5440f49..1cadf44 100644
--- a/dlls/comctl32/tests/monthcal.c
+++ b/dlls/comctl32/tests/monthcal.c
@@ -1325,6 +1325,9 @@ static void test_scroll(void)
hwnd = create_monthcal_control(0);
+ res = SendMessage(hwnd, MCM_GETMONTHDELTA, 0, 0);
+ expect(2, res);
+
flush_sequences(sequences, NUM_MSG_SEQUENCES);
/* Setter and Getters for scroll rate */
--
1.8.4
More information about the wine-patches
mailing list