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
f273bdc0
Commit
f273bdc0
authored
Feb 16, 2006
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Feb 16, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Don't change month range in MCM_SETRANGE. Add tests for this.
parent
89529f8a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
18 deletions
+10
-18
monthcal.c
dlls/comctl32/monthcal.c
+1
-16
monthcal.c
dlls/comctl32/tests/monthcal.c
+9
-2
No files found.
dlls/comctl32/monthcal.c
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
;
}
...
...
dlls/comctl32/tests/monthcal.c
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
;
...
...
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