comctl32: Correct values passed in MCN_SELECT/MCN_SELCHANGE notifications.

This commit is contained in:
Sergey Guralnik 2012-08-17 10:24:12 +04:00 committed by Alexandre Julliard
parent c7abff0a27
commit d54979e329
2 changed files with 18 additions and 6 deletions

View File

@ -185,7 +185,14 @@ static inline void MONTHCAL_NotifySelectionChange(const MONTHCAL_INFO *infoPtr)
nmsc.nmhdr.idFrom = GetWindowLongPtrW(infoPtr->hwndSelf, GWLP_ID);
nmsc.nmhdr.code = MCN_SELCHANGE;
nmsc.stSelStart = infoPtr->minSel;
nmsc.stSelEnd = infoPtr->maxSel;
nmsc.stSelStart.wDayOfWeek = 0;
if(infoPtr->dwStyle & MCS_MULTISELECT){
nmsc.stSelEnd = infoPtr->maxSel;
nmsc.stSelEnd.wDayOfWeek = 0;
}
else
nmsc.stSelEnd = st_null;
SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, nmsc.nmhdr.idFrom, (LPARAM)&nmsc);
}
@ -198,7 +205,13 @@ static inline void MONTHCAL_NotifySelect(const MONTHCAL_INFO *infoPtr)
nmsc.nmhdr.idFrom = GetWindowLongPtrW(infoPtr->hwndSelf, GWLP_ID);
nmsc.nmhdr.code = MCN_SELECT;
nmsc.stSelStart = infoPtr->minSel;
nmsc.stSelEnd = infoPtr->maxSel;
nmsc.stSelStart.wDayOfWeek = 0;
if(infoPtr->dwStyle & MCS_MULTISELECT){
nmsc.stSelEnd = infoPtr->maxSel;
nmsc.stSelEnd.wDayOfWeek = 0;
}
else
nmsc.stSelEnd = st_null;
SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, nmsc.nmhdr.idFrom, (LPARAM)&nmsc);
}

View File

@ -502,19 +502,18 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP
expect(st[0].wYear, nmchg->stSelStart.wYear);
expect(st[0].wMonth, nmchg->stSelStart.wMonth);
todo_wine expect(0, nmchg->stSelStart.wDayOfWeek);
expect(0, nmchg->stSelStart.wDayOfWeek);
expect(st[0].wDay, nmchg->stSelStart.wDay);
if(is_multisel)
{
expect(st[1].wYear, nmchg->stSelEnd.wYear);
expect(st[1].wMonth, nmchg->stSelEnd.wMonth);
todo_wine expect(0, nmchg->stSelEnd.wDayOfWeek);
expect(0, nmchg->stSelEnd.wDayOfWeek);
expect(st[1].wDay, nmchg->stSelEnd.wDay);
}
else
todo_wine
ok(!(nmchg->stSelEnd.wYear | nmchg->stSelEnd.wMonth |
ok(!(nmchg->stSelEnd.wYear | nmchg->stSelEnd.wMonth |
nmchg->stSelEnd.wDayOfWeek | nmchg->stSelEnd.wDay |
nmchg->stSelEnd.wHour | nmchg->stSelEnd.wMinute |
nmchg->stSelEnd.wSecond | nmchg->stSelEnd.wMilliseconds),