Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
f273bdc0
Commit
f273bdc0
authored
19 years ago
by
Vitaliy Margolen
Committed by
Alexandre Julliard
19 years ago
Browse files
Options
Downloads
Patches
Plain Diff
comctl32: Don't change month range in MCM_SETRANGE. Add tests for this.
parent
89529f8a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/comctl32/monthcal.c
+1
-16
1 addition, 16 deletions
dlls/comctl32/monthcal.c
dlls/comctl32/tests/monthcal.c
+9
-2
9 additions, 2 deletions
dlls/comctl32/tests/monthcal.c
with
10 additions
and
18 deletions
dlls/comctl32/monthcal.c
+
1
−
16
View file @
f273bdc0
...
...
@@ -930,17 +930,10 @@ MONTHCAL_GetMaxTodayWidth(MONTHCAL_INFO *infoPtr)
}
/* FIXME: are validated times taken from current date/time or simply
* copied?
* FIXME: check whether MCM_GETMONTHRANGE shows correct result after
* adjusting range with MCM_SETRANGE
*/
static
LRESULT
MONTHCAL_SetRange
(
MONTHCAL_INFO
*
infoPtr
,
WPARAM
wParam
,
LPARAM
lParam
)
{
SYSTEMTIME
*
lprgSysTimeArray
=
(
SYSTEMTIME
*
)
lParam
;
int
prev
;
TRACE
(
"%x %lx
\n
"
,
wParam
,
lParam
);
...
...
@@ -959,15 +952,7 @@ MONTHCAL_SetRange(MONTHCAL_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
infoPtr
->
rangeValid
|=
GDTR_MAX
;
}
prev
=
infoPtr
->
monthRange
;
infoPtr
->
monthRange
=
infoPtr
->
maxDate
.
wMonth
-
infoPtr
->
minDate
.
wMonth
;
if
(
infoPtr
->
monthRange
!=
prev
)
{
infoPtr
->
monthdayState
=
ReAlloc
(
infoPtr
->
monthdayState
,
infoPtr
->
monthRange
*
sizeof
(
MONTHDAYSTATE
));
}
return
1
;
return
TRUE
;
}
...
...
This diff is collapsed.
Click to expand it.
dlls/comctl32/tests/monthcal.c
+
9
−
2
View file @
f273bdc0
...
...
@@ -33,6 +33,7 @@ void test_monthcal(void)
HWND
hwnd
;
SYSTEMTIME
st
[
2
],
st1
[
2
];
INITCOMMONCONTROLSEX
ic
=
{
sizeof
(
INITCOMMONCONTROLSEX
),
ICC_DATE_CLASSES
};
int
res
,
month_range
;
InitCommonControlsEx
(
&
ic
);
hwnd
=
CreateWindowA
(
MONTHCAL_CLASSA
,
"MonthCal"
,
WS_POPUP
|
WS_VISIBLE
,
CW_USEDEFAULT
,
...
...
@@ -61,19 +62,25 @@ void test_monthcal(void)
st
[
0
].
wMonth
=
5
;
st
[
1
]
=
st
[
0
];
month_range
=
SendMessage
(
hwnd
,
MCM_GETMONTHRANGE
,
GMR_VISIBLE
,
(
LPARAM
)
st1
);
st
[
1
].
wMonth
--
;
ok
(
SendMessage
(
hwnd
,
MCM_SETRANGE
,
GDTR_MIN
|
GDTR_MAX
,
(
LPARAM
)
st
),
"Failed to set both min and max limits
\n
"
);
res
=
SendMessage
(
hwnd
,
MCM_GETMONTHRANGE
,
GMR_VISIBLE
,
(
LPARAM
)
st1
);
ok
(
res
==
month_range
,
"Invalid month range (%d)
\n
"
,
res
);
st
[
1
].
wMonth
+=
2
;
ok
(
SendMessage
(
hwnd
,
MCM_SETRANGE
,
GDTR_MIN
|
GDTR_MAX
,
(
LPARAM
)
st
),
"Failed to set both min and max limits
\n
"
);
res
=
SendMessage
(
hwnd
,
MCM_GETMONTHRANGE
,
GMR_VISIBLE
,
(
LPARAM
)
st1
);
ok
(
res
==
month_range
,
"Invalid month range (%d)
\n
"
,
res
);
st
[
1
].
wYear
--
;
ok
(
SendMessage
(
hwnd
,
MCM_SETRANGE
,
GDTR_MIN
|
GDTR_MAX
,
(
LPARAM
)
st
),
"Failed to set both min and max limits
\n
"
);
st
[
1
].
wYear
+=
1
;
ok
(
SendMessage
(
hwnd
,
MCM_SETRANGE
,
GDTR_MIN
|
GDTR_MAX
,
(
LPARAM
)
st
),
"Failed to set both min and max limits
\n
"
);
/* This crashing Wine so commented untill fixed.
st
[
1
].
wMonth
-=
3
;
ok
(
SendMessage
(
hwnd
,
MCM_SETRANGE
,
GDTR_MAX
,
(
LPARAM
)
st
),
"Failed to set max limit
\n
"
);
*/
st
[
1
].
wMonth
+=
4
;
ok
(
SendMessage
(
hwnd
,
MCM_SETRANGE
,
GDTR_MAX
,
(
LPARAM
)
st
),
"Failed to set max limit
\n
"
);
st
[
1
].
wYear
-=
3
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment