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
fec346b3
Commit
fec346b3
authored
Sep 14, 2011
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/monthcal: Properly compute maximum date for control.
parent
e7164213
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
monthcal.c
dlls/comctl32/monthcal.c
+16
-4
No files found.
dlls/comctl32/monthcal.c
View file @
fec346b3
...
@@ -521,15 +521,27 @@ static void MONTHCAL_GetMinDate(const MONTHCAL_INFO *infoPtr, SYSTEMTIME *date)
...
@@ -521,15 +521,27 @@ static void MONTHCAL_GetMinDate(const MONTHCAL_INFO *infoPtr, SYSTEMTIME *date)
static
void
MONTHCAL_GetMaxDate
(
const
MONTHCAL_INFO
*
infoPtr
,
SYSTEMTIME
*
date
)
static
void
MONTHCAL_GetMaxDate
(
const
MONTHCAL_INFO
*
infoPtr
,
SYSTEMTIME
*
date
)
{
{
/* the latest date is in latest calendar */
/* the latest date is in latest calendar */
SYSTEMTIME
st
,
lt_month
=
infoPtr
->
calendars
[
MONTHCAL_GetCalCount
(
infoPtr
)
-
1
].
month
;
SYSTEMTIME
st
,
*
lt_month
=
&
infoPtr
->
calendars
[
MONTHCAL_GetCalCount
(
infoPtr
)
-
1
].
month
;
INT
first_day
;
*
date
=
*
lt_month
;
st
=
*
lt_month
;
/* day of week of first day of current month */
st
.
wDay
=
1
;
first_day
=
MONTHCAL_CalculateDayOfWeek
(
&
st
,
FALSE
);
*
date
=
lt_month
;
MONTHCAL_GetNextMonth
(
date
);
MONTHCAL_GetNextMonth
(
date
);
MONTHCAL_GetPrevMonth
(
&
st
);
/* last calendar starts with some date from previous month that not displayed */
st
.
wDay
=
MONTHCAL_MonthLength
(
st
.
wMonth
,
st
.
wYear
)
+
(
infoPtr
->
firstDay
-
first_day
)
%
7
+
1
;
if
(
st
.
wDay
>
MONTHCAL_MonthLength
(
st
.
wMonth
,
st
.
wYear
))
st
.
wDay
-=
7
;
MONTHCAL_GetMinDate
(
infoPtr
,
&
st
);
/* Use month length to get max day. 42 means max day count in calendar area */
/* Use month length to get max day. 42 means max day count in calendar area */
date
->
wDay
=
42
-
(
MONTHCAL_MonthLength
(
st
.
wMonth
,
st
.
wYear
)
-
st
.
wDay
+
1
)
-
date
->
wDay
=
42
-
(
MONTHCAL_MonthLength
(
st
.
wMonth
,
st
.
wYear
)
-
st
.
wDay
+
1
)
-
MONTHCAL_MonthLength
(
lt_month
.
wMonth
,
lt_month
.
wYear
);
MONTHCAL_MonthLength
(
lt_month
->
wMonth
,
lt_month
->
wYear
);
/* fix day of week */
/* fix day of week */
MONTHCAL_CalculateDayOfWeek
(
date
,
TRUE
);
MONTHCAL_CalculateDayOfWeek
(
date
,
TRUE
);
...
...
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