comctl32/monthcal: Fix hittesting for MCHT_CALENDARDATEPREV/MCHT_CALENDARDATENEXT cases.
This commit is contained in:
parent
74d000489b
commit
344f07007b
|
@ -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++;
|
||||
|
|
Loading…
Reference in New Issue