mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 08:13:18 +00:00
comctl32/monthcal: Make prev/next month day a current selection on LButton release.
This commit is contained in:
parent
344f07007b
commit
cc6fca015c
1 changed files with 8 additions and 7 deletions
|
@ -1564,16 +1564,17 @@ MONTHCAL_LButtonUp(MONTHCAL_INFO *infoPtr, LPARAM lParam)
|
||||||
|
|
||||||
infoPtr->status = MC_SEL_LBUTUP;
|
infoPtr->status = MC_SEL_LBUTUP;
|
||||||
|
|
||||||
if(hit == MCHT_CALENDARDATENEXT) {
|
if((hit == MCHT_CALENDARDATENEXT) || (hit == MCHT_CALENDARDATEPREV)) {
|
||||||
MONTHCAL_GoToNextMonth(infoPtr);
|
SYSTEMTIME st[2];
|
||||||
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
|
|
||||||
return TRUE;
|
st[0] = st[1] = ht.st;
|
||||||
}
|
MONTHCAL_SetSelRange(infoPtr, st);
|
||||||
if(hit == MCHT_CALENDARDATEPREV){
|
MONTHCAL_SetCurSel(infoPtr, &st[0]);
|
||||||
MONTHCAL_GoToPrevMonth(infoPtr);
|
|
||||||
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
|
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
nmhdr.hwndFrom = infoPtr->hwndSelf;
|
nmhdr.hwndFrom = infoPtr->hwndSelf;
|
||||||
nmhdr.idFrom = GetWindowLongPtrW(infoPtr->hwndSelf, GWLP_ID);
|
nmhdr.idFrom = GetWindowLongPtrW(infoPtr->hwndSelf, GWLP_ID);
|
||||||
nmhdr.code = NM_RELEASEDCAPTURE;
|
nmhdr.code = NM_RELEASEDCAPTURE;
|
||||||
|
|
Loading…
Reference in a new issue