[comctl32] MonthCalendar - Fix wrong date selected when
clicknext/prev months day (#6967)
Vijay Kiran Kamuju
infyquest at gmail.com
Mon Dec 25 06:56:35 CST 2006
On 12/25/06, Dmitry Timoshkov <dmitry at codeweavers.com> wrote:
> "Vijay Kiran Kamuju" <infyquest at gmail.com> wrote:
> > - retval = *daypos + (7 * *weekpos) - firstDay;
> > + retval = *daypos + ((7 * *weekpos) - firstDay);
> > return retval;
> > }
> This change doesn't make any difference, neither in functionality,
> nor in readability IMO. Please avoid this kind of changes, it only
> clutters the patch, making it hard to see what is the real change.
This was a mistake I didnt notice.
> > - lpht->st.wDay = MONTHCAL_MonthLength(lpht->st.wMonth,lpht->st.wYear) -day;
> > + lpht->st.wDay = day+MONTHCAL_MonthLength(lpht->st.wMonth,lpht->st.wYear) ;
> A couple of spaces around '+' won't hurt, and a space before ';' doesn't match
> an existing code style.
Will change this one, I was bit out of style.
> > - return TRUE;
> > + /*return TRUE;*/
> If you are not sure that the return should be removed, it's a sign that you
> need a test case, just commenting it out without any explanation is not a solution.
> Same comment to all other similar cases.
Should I add comments or Do I have to add test cases?
test cases are bit difficult as they are all UI based, and dont have
As I rearranged the codes and removed the returns as the necessary
messages are not being sent (in order as observed on windows using
both old and latest versions of ControlSpy)
If you think I should add comments, I would be glad to modify.
Tests are a bit difficult :( (if you can help, I will try)
> > + MONTHCAL_CopyTime(&infoPtr->minSel,&nmsc.stSelStart);
> > + MONTHCAL_CopyTime(&infoPtr->maxSel,&nmsc.stSelEnd);
> > nmsc.nmhdr.hwndFrom = infoPtr->hwndSelf;
> > nmsc.nmhdr.idFrom = GetWindowLongPtrW(infoPtr->hwndSelf, GWLP_ID);
> > nmsc.nmhdr.code = MCN_SELCHANGE;
> > - MONTHCAL_CopyTime(&infoPtr->minSel,&nmsc.stSelStart);
> > - MONTHCAL_CopyTime(&infoPtr->maxSel,&nmsc.stSelEnd);
> This change is not needed.
I agree. This came up because it while doing regression testing with
new control spy V2.0 where MULTISELECT message is not eanbled by
Should I send a new version of the patch, with the changes?
Waiting for your reply.
More information about the wine-devel