Nikolay Sivov : comctl32/monthcal: Implement MCM_GETCALENDARCOUNT.

Alexandre Julliard julliard at winehq.org
Tue Sep 20 13:08:35 CDT 2011


Module: wine
Branch: master
Commit: 0d3b04d033a891149e613b9f6273da08a7209e03
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0d3b04d033a891149e613b9f6273da08a7209e03

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Tue Sep 20 09:57:28 2011 +0400

comctl32/monthcal: Implement MCM_GETCALENDARCOUNT.

---

 dlls/comctl32/monthcal.c       |    3 +++
 dlls/comctl32/tests/monthcal.c |   21 +++++++++++++++++++++
 include/commctrl.h             |    1 +
 3 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c
index 8fcdf28..f46ec5f 100644
--- a/dlls/comctl32/monthcal.c
+++ b/dlls/comctl32/monthcal.c
@@ -2809,6 +2809,9 @@ MONTHCAL_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
   case MCM_GETUNICODEFORMAT:
     return MONTHCAL_GetUnicodeFormat(infoPtr);
 
+  case MCM_GETCALENDARCOUNT:
+    return MONTHCAL_GetCalCount(infoPtr);
+
   case WM_GETDLGCODE:
     return DLGC_WANTARROWS | DLGC_WANTCHARS;
 
diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c
index 83b789d..87aadec 100644
--- a/dlls/comctl32/tests/monthcal.c
+++ b/dlls/comctl32/tests/monthcal.c
@@ -1799,6 +1799,26 @@ static void test_MCM_SIZERECTTOMIN(void)
     DestroyWindow(hwnd);
 }
 
+static void test_MCM_GETCALENDARCOUNT(void)
+{
+    HWND hwnd;
+    DWORD ret;
+
+    hwnd = create_monthcal_control(0);
+
+    ret = SendMessageA(hwnd, MCM_GETCALENDARCOUNT, 0, 0);
+    if (ret == 0)
+    {
+        win_skip("Message MCM_GETCALENDARCOUNT unsupported. Skipping.\n");
+        DestroyWindow(hwnd);
+        return;
+    }
+
+    todo_wine expect(2, ret);
+
+    DestroyWindow(hwnd);
+}
+
 START_TEST(monthcal)
 {
     BOOL (WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX*);
@@ -1866,6 +1886,7 @@ START_TEST(monthcal)
     test_hittest_v6();
     test_get_set_border();
     test_MCM_SIZERECTTOMIN();
+    test_MCM_GETCALENDARCOUNT();
 
     unload_v6_module(ctx_cookie, hCtx);
 
diff --git a/include/commctrl.h b/include/commctrl.h
index 21f481e..e19b861 100644
--- a/include/commctrl.h
+++ b/include/commctrl.h
@@ -4689,6 +4689,7 @@ static const WCHAR MONTHCAL_CLASSW[] = { 'S','y','s',
 #define MCM_GETMONTHDELTA     (MCM_FIRST + 19)
 #define MCM_SETMONTHDELTA     (MCM_FIRST + 20)
 #define MCM_GETMAXTODAYWIDTH  (MCM_FIRST + 21)
+#define MCM_GETCALENDARCOUNT  (MCM_FIRST + 23)
 #define MCM_SIZERECTTOMIN     (MCM_FIRST + 29)
 #define MCM_SETCALENDARBORDER (MCM_FIRST + 30)
 #define MCM_GETCALENDARBORDER (MCM_FIRST + 31)




More information about the wine-cvs mailing list