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
68701440
Commit
68701440
authored
Mar 14, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/monthcal: Always reset range flags and date limits on MCM_SETRANGE.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
99341249
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
3 deletions
+39
-3
monthcal.c
dlls/comctl32/monthcal.c
+3
-0
datetime.c
dlls/comctl32/tests/datetime.c
+1
-3
monthcal.c
dlls/comctl32/tests/monthcal.c
+35
-0
No files found.
dlls/comctl32/monthcal.c
View file @
68701440
...
...
@@ -1452,6 +1452,9 @@ MONTHCAL_SetRange(MONTHCAL_INFO *infoPtr, SHORT limits, SYSTEMTIME *range)
(
limits
&
GDTR_MAX
&&
!
MONTHCAL_ValidateDate
(
&
range
[
1
])))
return
FALSE
;
infoPtr
->
rangeValid
=
0
;
infoPtr
->
minDate
=
infoPtr
->
maxDate
=
st_null
;
if
(
limits
&
GDTR_MIN
)
{
if
(
!
MONTHCAL_ValidateTime
(
&
range
[
0
]))
...
...
dlls/comctl32/tests/datetime.c
View file @
68701440
...
...
@@ -360,9 +360,7 @@ static void test_dtm_set_and_get_range(void)
r
=
SendMessageA
(
hWnd
,
DTM_SETRANGE
,
GDTR_MAX
,
(
LPARAM
)
st
);
expect
(
1
,
r
);
r
=
SendMessageA
(
hWnd
,
DTM_GETRANGE
,
0
,
(
LPARAM
)
getSt
);
todo_wine
{
ok
(
r
==
GDTR_MAX
,
"Expected %x, not %x(GDTR_MIN) or %x(GDTR_MIN | GDTR_MAX), got %lx
\n
"
,
GDTR_MAX
,
GDTR_MIN
,
GDTR_MIN
|
GDTR_MAX
,
r
);
}
ok
(
r
==
GDTR_MAX
,
"Expected %x, not %x(GDTR_MIN) or %x(GDTR_MIN | GDTR_MAX), got %lx
\n
"
,
GDTR_MAX
,
GDTR_MIN
,
GDTR_MIN
|
GDTR_MAX
,
r
);
expect_systime
(
&
st
[
1
],
&
getSt
[
1
]);
r
=
SendMessageA
(
hWnd
,
DTM_SETRANGE
,
GDTR_MIN
,
(
LPARAM
)
st
);
...
...
dlls/comctl32/tests/monthcal.c
View file @
68701440
...
...
@@ -262,6 +262,7 @@ static void test_monthcal(void)
SYSTEMTIME
st
[
2
],
st1
[
2
],
today
;
int
res
,
month_range
;
DWORD
limits
;
BOOL
r
;
hwnd
=
CreateWindowA
(
MONTHCAL_CLASSA
,
"MonthCal"
,
WS_POPUP
|
WS_VISIBLE
,
CW_USEDEFAULT
,
0
,
300
,
300
,
0
,
0
,
NULL
,
NULL
);
...
...
@@ -453,6 +454,40 @@ static void test_monthcal(void)
expect
(
0
,
st1
[
1
].
wSecond
);
expect
(
0
,
st1
[
1
].
wMilliseconds
);
/* 0 limit flags */
limits
=
SendMessageA
(
hwnd
,
MCM_GETRANGE
,
0
,
(
LPARAM
)
st1
);
ok
(
limits
==
GDTR_MIN
,
"got 0x%08x
\n
"
,
limits
);
GetSystemTime
(
st
);
st
[
1
]
=
st
[
0
];
st
[
1
].
wYear
++
;
r
=
SendMessageA
(
hwnd
,
MCM_SETRANGE
,
0
,
(
LPARAM
)
st
);
ok
(
r
,
"got %d
\n
"
,
r
);
limits
=
SendMessageA
(
hwnd
,
MCM_GETRANGE
,
0
,
(
LPARAM
)
st
);
ok
(
limits
==
0
,
"got 0x%08x
\n
"
,
limits
);
ok
(
st
[
0
].
wYear
==
0
&&
st
[
1
].
wYear
==
0
,
"got %u, %u
\n
"
,
st
[
0
].
wYear
,
st
[
1
].
wYear
);
/* flags are 0, set min limit */
GetSystemTime
(
st
);
st
[
1
]
=
st
[
0
];
st
[
1
].
wYear
++
;
r
=
SendMessageA
(
hwnd
,
MCM_SETRANGE
,
GDTR_MIN
,
(
LPARAM
)
st
);
ok
(
r
,
"got %d
\n
"
,
r
);
limits
=
SendMessageA
(
hwnd
,
MCM_GETRANGE
,
0
,
(
LPARAM
)
st1
);
ok
(
limits
==
GDTR_MIN
,
"got 0x%08x
\n
"
,
limits
);
ok
(
st1
[
1
].
wYear
==
0
,
"got %u
\n
"
,
st1
[
1
].
wYear
);
/* now set max limit, check flags */
r
=
SendMessageA
(
hwnd
,
MCM_SETRANGE
,
GDTR_MAX
,
(
LPARAM
)
st
);
ok
(
r
,
"got %d
\n
"
,
r
);
limits
=
SendMessageA
(
hwnd
,
MCM_GETRANGE
,
0
,
(
LPARAM
)
st1
);
ok
(
limits
==
GDTR_MAX
,
"got 0x%08x
\n
"
,
limits
);
ok
(
st1
[
0
].
wYear
==
0
,
"got %u
\n
"
,
st1
[
0
].
wYear
);
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