Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
d6349844
Commit
d6349844
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: Correct MCM_SETTODAY handler return value.
parent
efbb4196
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
7 deletions
+28
-7
monthcal.c
dlls/comctl32/monthcal.c
+5
-4
monthcal.c
dlls/comctl32/tests/monthcal.c
+23
-3
No files found.
dlls/comctl32/monthcal.c
View file @
d6349844
...
...
@@ -1680,12 +1680,13 @@ MONTHCAL_SetToday(MONTHCAL_INFO *infoPtr, const SYSTEMTIME *today)
{
TRACE
(
"%p
\n
"
,
today
);
if
(
!
today
)
return
FALSE
;
if
(
today
)
{
/* remember if date was set successfully */
if
(
MONTHCAL_UpdateToday
(
infoPtr
,
today
))
infoPtr
->
todaySet
=
TRUE
;
if
(
MONTHCAL_UpdateToday
(
infoPtr
,
today
))
infoPtr
->
todaySet
=
TRUE
;
}
return
TRUE
;
return
0
;
}
/* returns calendar index containing specified point, or -1 if it's background */
...
...
dlls/comctl32/tests/monthcal.c
View file @
d6349844
...
...
@@ -775,6 +775,23 @@ static void test_currdate(void)
res
=
SendMessage
(
hwnd
,
MCM_SETCURSEL
,
0
,
(
LPARAM
)
&
st_new
);
expect
(
1
,
res
);
/* set with invalid day of week */
memset
(
&
st_test
,
0
,
sizeof
(
st_test
));
st_test
.
wYear
=
2009
;
st_test
.
wDay
=
7
;
st_test
.
wMonth
=
10
;
st_test
.
wDayOfWeek
=
100
;
res
=
SendMessage
(
hwnd
,
MCM_SETCURSEL
,
0
,
(
LPARAM
)
&
st_test
);
todo_wine
expect
(
1
,
res
);
memset
(
&
st_test
,
0
,
sizeof
(
st_test
));
res
=
SendMessage
(
hwnd
,
MCM_GETCURSEL
,
0
,
(
LPARAM
)
&
st_test
);
expect
(
1
,
res
);
expect
(
2009
,
st_test
.
wYear
);
todo_wine
expect
(
7
,
st_test
.
wDay
);
expect
(
10
,
st_test
.
wMonth
);
todo_wine
expect
(
3
,
st_test
.
wDayOfWeek
);
DestroyWindow
(
hwnd
);
}
...
...
@@ -1162,7 +1179,8 @@ static void test_todaylink(void)
st_test
.
wMonth
=
1
;
st_test
.
wYear
=
2005
;
SendMessage
(
hwnd
,
MCM_SETTODAY
,
0
,
(
LPARAM
)
&
st_test
);
res
=
SendMessage
(
hwnd
,
MCM_SETTODAY
,
0
,
(
LPARAM
)
&
st_test
);
expect
(
0
,
res
);
memset
(
&
st_new
,
0
,
sizeof
(
st_new
));
res
=
SendMessage
(
hwnd
,
MCM_GETTODAY
,
0
,
(
LPARAM
)
&
st_new
);
...
...
@@ -1206,7 +1224,8 @@ static void test_today(void)
st_new
.
wDay
=
27
;
st_new
.
wMonth
=
27
;
SendMessage
(
hwnd
,
MCM_SETTODAY
,
0
,
(
LPARAM
)
&
st_test
);
res
=
SendMessage
(
hwnd
,
MCM_SETTODAY
,
0
,
(
LPARAM
)
&
st_test
);
expect
(
0
,
res
);
res
=
SendMessage
(
hwnd
,
MCM_GETTODAY
,
0
,
(
LPARAM
)
&
st_new
);
expect
(
1
,
res
);
...
...
@@ -1223,7 +1242,8 @@ static void test_today(void)
st_test
.
wDay
=
0
;
st_test
.
wMonth
=
0
;
SendMessage
(
hwnd
,
MCM_SETTODAY
,
0
,
(
LPARAM
)
&
st_test
);
res
=
SendMessage
(
hwnd
,
MCM_SETTODAY
,
0
,
(
LPARAM
)
&
st_test
);
expect
(
0
,
res
);
res
=
SendMessage
(
hwnd
,
MCM_GETTODAY
,
0
,
(
LPARAM
)
&
st_new
);
expect
(
1
,
res
);
...
...
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