Commit d54979e3 authored by Sergey Guralnik's avatar Sergey Guralnik Committed by Alexandre Julliard

comctl32: Correct values passed in MCN_SELECT/MCN_SELCHANGE notifications.

parent c7abff0a
......@@ -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);
}
......
......@@ -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),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment