]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/calctrl.cpp
try to fix SF bug 1913671
[wxWidgets.git] / src / msw / calctrl.cpp
index 8a10681823b74063f47ff487aeafe286b3ed3842..2f2feb40a4245112786f7fe894c90f9b64bb248e 100644 (file)
@@ -109,9 +109,8 @@ WXDWORD wxCalendarCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const
 {
     WXDWORD styleMSW = wxCalendarCtrlBase::MSWGetStyle(style, exstyle);
 
-    // right now we don't support any native styles but we should add wx styles
-    // corresponding to MCS_NOTODAY, MCS_NOTODAYCIRCLE and MCS_WEEKNUMBERS
-    // probably (TODO)
+    // right now we don't support all native styles but we should add wx styles
+    // corresponding to MCS_NOTODAY and MCS_NOTODAYCIRCLE probably (TODO)
 
     // for compatibility with the other versions, just turn off today display
     // unconditionally for now
@@ -120,6 +119,9 @@ WXDWORD wxCalendarCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const
     // we also need this style for Mark() to work
     styleMSW |= MCS_DAYSTATE;
 
+    if ( style & wxCAL_SHOW_WEEK_NUMBERS )
+       styleMSW |= MCS_WEEKNUMBERS;
+
     return styleMSW;
 }
 
@@ -330,7 +332,7 @@ void wxCalendarCtrl::UpdateMarks()
 {
     MONTHDAYSTATE states[3];
     const int nMonths = MonthCal_GetMonthRange(GetHwnd(), GMR_DAYSTATE, NULL);
-    wxCHECK_RET( nMonths <= WXSIZEOF(states), "unexpected months range" );
+    wxCHECK_RET( nMonths <= (int)WXSIZEOF(states), "unexpected months range" );
 
     for ( int i = 0; i < nMonths; i++ )
         states[i] = m_marks;