Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
d3758e02
Commit
d3758e02
authored
Sep 23, 2011
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/monthcal: Properly adjust day of week in MCM_SETCURSEL.
parent
d6349844
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
monthcal.c
dlls/comctl32/monthcal.c
+5
-6
monthcal.c
dlls/comctl32/tests/monthcal.c
+3
-3
No files found.
dlls/comctl32/monthcal.c
View file @
d3758e02
...
@@ -247,9 +247,7 @@ static inline BOOL MONTHCAL_IsDateEqual(const SYSTEMTIME *first, const SYSTEMTIM
...
@@ -247,9 +247,7 @@ static inline BOOL MONTHCAL_IsDateEqual(const SYSTEMTIME *first, const SYSTEMTIM
static
BOOL
MONTHCAL_ValidateDate
(
const
SYSTEMTIME
*
time
)
static
BOOL
MONTHCAL_ValidateDate
(
const
SYSTEMTIME
*
time
)
{
{
if
(
time
->
wMonth
<
1
||
time
->
wMonth
>
12
)
return
FALSE
;
if
(
time
->
wMonth
<
1
||
time
->
wMonth
>
12
)
return
FALSE
;
if
(
time
->
wDayOfWeek
>
6
)
return
FALSE
;
if
(
time
->
wDay
>
MONTHCAL_MonthLength
(
time
->
wMonth
,
time
->
wYear
))
return
FALSE
;
if
(
time
->
wDay
>
MONTHCAL_MonthLength
(
time
->
wMonth
,
time
->
wYear
))
return
FALSE
;
return
TRUE
;
return
TRUE
;
}
}
...
@@ -1481,7 +1479,7 @@ MONTHCAL_GetCurSel(const MONTHCAL_INFO *infoPtr, SYSTEMTIME *curSel)
...
@@ -1481,7 +1479,7 @@ MONTHCAL_GetCurSel(const MONTHCAL_INFO *infoPtr, SYSTEMTIME *curSel)
static
LRESULT
static
LRESULT
MONTHCAL_SetCurSel
(
MONTHCAL_INFO
*
infoPtr
,
SYSTEMTIME
*
curSel
)
MONTHCAL_SetCurSel
(
MONTHCAL_INFO
*
infoPtr
,
SYSTEMTIME
*
curSel
)
{
{
SYSTEMTIME
prev
=
infoPtr
->
minSel
;
SYSTEMTIME
prev
=
infoPtr
->
minSel
,
selection
;
INT
diff
;
INT
diff
;
WORD
day
;
WORD
day
;
...
@@ -1511,8 +1509,9 @@ MONTHCAL_SetCurSel(MONTHCAL_INFO *infoPtr, SYSTEMTIME *curSel)
...
@@ -1511,8 +1509,9 @@ MONTHCAL_SetCurSel(MONTHCAL_INFO *infoPtr, SYSTEMTIME *curSel)
MONTHCAL_GetMonth
(
&
infoPtr
->
calendars
[
i
].
month
,
diff
);
MONTHCAL_GetMonth
(
&
infoPtr
->
calendars
[
i
].
month
,
diff
);
}
}
infoPtr
->
minSel
=
*
curSel
;
selection
=
*
curSel
;
infoPtr
->
maxSel
=
*
curSel
;
MONTHCAL_CalculateDayOfWeek
(
&
selection
,
TRUE
);
infoPtr
->
minSel
=
infoPtr
->
maxSel
=
selection
;
/* if selection is still in current month, reduce rectangle */
/* if selection is still in current month, reduce rectangle */
day
=
prev
.
wDay
;
day
=
prev
.
wDay
;
...
...
dlls/comctl32/tests/monthcal.c
View file @
d3758e02
...
@@ -782,15 +782,15 @@ static void test_currdate(void)
...
@@ -782,15 +782,15 @@ static void test_currdate(void)
st_test
.
wMonth
=
10
;
st_test
.
wMonth
=
10
;
st_test
.
wDayOfWeek
=
100
;
st_test
.
wDayOfWeek
=
100
;
res
=
SendMessage
(
hwnd
,
MCM_SETCURSEL
,
0
,
(
LPARAM
)
&
st_test
);
res
=
SendMessage
(
hwnd
,
MCM_SETCURSEL
,
0
,
(
LPARAM
)
&
st_test
);
todo_wine
expect
(
1
,
res
);
expect
(
1
,
res
);
memset
(
&
st_test
,
0
,
sizeof
(
st_test
));
memset
(
&
st_test
,
0
,
sizeof
(
st_test
));
res
=
SendMessage
(
hwnd
,
MCM_GETCURSEL
,
0
,
(
LPARAM
)
&
st_test
);
res
=
SendMessage
(
hwnd
,
MCM_GETCURSEL
,
0
,
(
LPARAM
)
&
st_test
);
expect
(
1
,
res
);
expect
(
1
,
res
);
expect
(
2009
,
st_test
.
wYear
);
expect
(
2009
,
st_test
.
wYear
);
todo_wine
expect
(
7
,
st_test
.
wDay
);
expect
(
7
,
st_test
.
wDay
);
expect
(
10
,
st_test
.
wMonth
);
expect
(
10
,
st_test
.
wMonth
);
todo_wine
expect
(
3
,
st_test
.
wDayOfWeek
);
expect
(
3
,
st_test
.
wDayOfWeek
);
DestroyWindow
(
hwnd
);
DestroyWindow
(
hwnd
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment