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
d66dcb4f
Commit
d66dcb4f
authored
Sep 26, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/monthcal: Store full date info for selection at creation time.
parent
0617baf2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
17 deletions
+51
-17
monthcal.c
dlls/comctl32/monthcal.c
+15
-17
monthcal.c
dlls/comctl32/tests/monthcal.c
+36
-0
No files found.
dlls/comctl32/monthcal.c
View file @
d66dcb4f
...
...
@@ -1872,25 +1872,23 @@ MONTHCAL_Create(HWND hwnd, LPCREATESTRUCTW lpcs)
infoPtr
->
firstDayHighWord
=
FALSE
;
MONTHCAL_SetFirstDayOfWeek
(
infoPtr
,
-
1
);
infoPtr
->
currentMonth
=
infoPtr
->
todaysDate
.
wMonth
;
infoPtr
->
currentYear
=
infoPtr
->
todaysDate
.
wYear
;
infoPtr
->
currentYear
=
infoPtr
->
todaysDate
.
wYear
;
infoPtr
->
minDate
=
infoPtr
->
todaysDate
;
infoPtr
->
maxDate
=
infoPtr
->
todaysDate
;
infoPtr
->
maxDate
.
wYear
=
2050
;
infoPtr
->
minDate
.
wYear
=
1950
;
infoPtr
->
maxSelCount
=
7
;
infoPtr
->
monthRange
=
3
;
infoPtr
->
monthdayState
=
Alloc
(
infoPtr
->
monthRange
*
sizeof
(
MONTHDAYSTATE
));
infoPtr
->
titlebk
=
comctl32_color
.
clrActiveCaption
;
infoPtr
->
titletxt
=
comctl32_color
.
clrWindow
;
infoPtr
->
monthbk
=
comctl32_color
.
clrWindow
;
infoPtr
->
trailingtxt
=
comctl32_color
.
clrGrayText
;
infoPtr
->
bk
=
comctl32_color
.
clrWindow
;
infoPtr
->
txt
=
comctl32_color
.
clrWindowText
;
/* set the current day for highlighing */
infoPtr
->
minSel
.
wDay
=
infoPtr
->
todaysDate
.
wDay
;
infoPtr
->
maxSel
.
wDay
=
infoPtr
->
todaysDate
.
wDay
;
infoPtr
->
maxDate
.
wYear
=
2050
;
infoPtr
->
minDate
.
wYear
=
1950
;
infoPtr
->
maxSelCount
=
7
;
infoPtr
->
monthRange
=
3
;
infoPtr
->
monthdayState
=
Alloc
(
infoPtr
->
monthRange
*
sizeof
(
MONTHDAYSTATE
));
infoPtr
->
titlebk
=
comctl32_color
.
clrActiveCaption
;
infoPtr
->
titletxt
=
comctl32_color
.
clrWindow
;
infoPtr
->
monthbk
=
comctl32_color
.
clrWindow
;
infoPtr
->
trailingtxt
=
comctl32_color
.
clrGrayText
;
infoPtr
->
bk
=
comctl32_color
.
clrWindow
;
infoPtr
->
txt
=
comctl32_color
.
clrWindowText
;
infoPtr
->
minSel
=
infoPtr
->
todaysDate
;
infoPtr
->
maxSel
=
infoPtr
->
todaysDate
;
/* call MONTHCAL_UpdateSize to set all of the dimensions */
/* of the control */
...
...
dlls/comctl32/tests/monthcal.c
View file @
d66dcb4f
...
...
@@ -1237,6 +1237,41 @@ static void test_monthcal_destroy(void)
ok_sequence
(
sequences
,
MONTHCAL_SEQ_INDEX
,
destroy_monthcal_multi_sel_style_seq
,
"Destroy monthcal (multi sel style)"
,
FALSE
);
}
static
void
test_monthcal_getselrange
(
void
)
{
HWND
hwnd
;
SYSTEMTIME
st
,
range
[
2
];
BOOL
ret
;
hwnd
=
create_monthcal_control
(
MCS_MULTISELECT
);
/* just after creation selection should start and end today */
ret
=
SendMessage
(
hwnd
,
MCM_GETTODAY
,
0
,
(
LPARAM
)
&
st
);
expect
(
TRUE
,
ret
);
ret
=
SendMessage
(
hwnd
,
MCM_GETSELRANGE
,
0
,
(
LPARAM
)
range
);
expect
(
TRUE
,
ret
);
expect
(
st
.
wYear
,
range
[
0
].
wYear
);
expect
(
st
.
wMonth
,
range
[
0
].
wMonth
);
expect
(
st
.
wDay
,
range
[
0
].
wDay
);
expect
(
st
.
wDayOfWeek
,
range
[
0
].
wDayOfWeek
);
expect
(
st
.
wHour
,
range
[
0
].
wHour
);
expect
(
st
.
wMinute
,
range
[
0
].
wMinute
);
expect
(
st
.
wSecond
,
range
[
0
].
wSecond
);
expect
(
st
.
wMilliseconds
,
range
[
0
].
wMilliseconds
);
expect
(
st
.
wYear
,
range
[
1
].
wYear
);
expect
(
st
.
wMonth
,
range
[
1
].
wMonth
);
expect
(
st
.
wDay
,
range
[
1
].
wDay
);
expect
(
st
.
wDayOfWeek
,
range
[
1
].
wDayOfWeek
);
expect
(
st
.
wHour
,
range
[
1
].
wHour
);
expect
(
st
.
wMinute
,
range
[
1
].
wMinute
);
expect
(
st
.
wSecond
,
range
[
1
].
wSecond
);
expect
(
st
.
wMilliseconds
,
range
[
1
].
wMilliseconds
);
DestroyWindow
(
hwnd
);
}
START_TEST
(
monthcal
)
{
HMODULE
hComctl32
;
...
...
@@ -1273,6 +1308,7 @@ START_TEST(monthcal)
test_monthcal_todaylink
();
test_monthcal_size
();
test_monthcal_maxselday
();
test_monthcal_getselrange
();
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
DestroyWindow
(
parent_wnd
);
...
...
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