comctl32/monthcal: Fix hittesting for MCHT_CALENDARDATEPREV/MCHT_CALENDARDATENEXT cases.

This commit is contained in:
Nikolay Sivov 2009-09-29 23:30:49 +04:00 committed by Alexandre Julliard
parent 74d000489b
commit 344f07007b
1 changed files with 13 additions and 13 deletions

View File

@ -1221,13 +1221,13 @@ MONTHCAL_HitTest(const MONTHCAL_INFO *infoPtr, MCHITTESTINFO *lpht)
lpht->st.wMonth = 12;
lpht->st.wYear--;
}
lpht->st.wDay = MONTHCAL_MonthLength(lpht->st.wMonth,lpht->st.wYear) -day;
lpht->st.wDay = MONTHCAL_MonthLength(lpht->st.wMonth,lpht->st.wYear) + day;
}
else if (day > MONTHCAL_MonthLength(infoPtr->curSel.wMonth,infoPtr->curSel.wYear))
{
retval = MCHT_CALENDARDATENEXT;
lpht->st.wMonth = infoPtr->curSel.wMonth + 1;
if (lpht->st.wMonth <12)
if (lpht->st.wMonth > 12)
{
lpht->st.wMonth = 1;
lpht->st.wYear++;