- wxCHECK_RET( nMonths == (int)WXSIZEOF(states), "unexpected months range" );
-
- // the fully visible month is the one in the middle
- states[1] = m_marks | m_holidays;
-
- if ( !MonthCal_SetDayState(GetHwnd(), nMonths, states) )
+ //
+ // OTOH Windows 7 control can show all 12 months or even years or decades
+ // in its window if you "zoom out" of it by double clicking on free areas
+ // so the return value can be (much, in case of decades view) greater than
+ // 3 but in this case marks are not visible anyhow so simply ignore it
+ if ( nMonths < WXSIZEOF(states) )
+ {
+ wxFAIL_MSG("unexpectedly few months shown in the control");
+ }
+ else if ( nMonths == WXSIZEOF(states) )