Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
6bd43fbb
Commit
6bd43fbb
authored
Sep 25, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 25, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/monthcal: Some cleanup to avoid cast in helpers.
parent
decc86ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
monthcal.c
dlls/comctl32/monthcal.c
+13
-13
No files found.
dlls/comctl32/monthcal.c
View file @
6bd43fbb
...
@@ -91,7 +91,7 @@ typedef struct
...
@@ -91,7 +91,7 @@ typedef struct
int
height_increment
;
int
height_increment
;
int
width_increment
;
int
width_increment
;
int
firstDayplace
;
/* place of the first day of the current month */
int
firstDayplace
;
/* place of the first day of the current month */
int
delta
;
/* scroll rate; # of months that the */
INT
delta
;
/* scroll rate; # of months that the */
/* control moves when user clicks a scroll button */
/* control moves when user clicks a scroll button */
int
visible
;
/* # of months visible */
int
visible
;
/* # of months visible */
int
firstDay
;
/* Start month calendar with firstDay's day */
int
firstDay
;
/* Start month calendar with firstDay's day */
...
@@ -166,7 +166,7 @@ static inline BOOL MONTHCAL_IsDateEqual(const SYSTEMTIME *first, const SYSTEMTIM
...
@@ -166,7 +166,7 @@ static inline BOOL MONTHCAL_IsDateEqual(const SYSTEMTIME *first, const SYSTEMTIM
}
}
/* make sure that time is valid */
/* make sure that time is valid */
static
int
MONTHCAL_ValidateTime
(
SYSTEMTIME
time
)
static
BOOL
MONTHCAL_ValidateTime
(
SYSTEMTIME
time
)
{
{
if
(
time
.
wMonth
<
1
||
time
.
wMonth
>
12
)
return
FALSE
;
if
(
time
.
wMonth
<
1
||
time
.
wMonth
>
12
)
return
FALSE
;
if
(
time
.
wDayOfWeek
>
6
)
return
FALSE
;
if
(
time
.
wDayOfWeek
>
6
)
return
FALSE
;
...
@@ -759,11 +759,11 @@ MONTHCAL_GetMinReqRect(const MONTHCAL_INFO *infoPtr, LPRECT lpRect)
...
@@ -759,11 +759,11 @@ MONTHCAL_GetMinReqRect(const MONTHCAL_INFO *infoPtr, LPRECT lpRect)
static
LRESULT
static
LRESULT
MONTHCAL_GetColor
(
const
MONTHCAL_INFO
*
infoPtr
,
WPARAM
wParam
)
MONTHCAL_GetColor
(
const
MONTHCAL_INFO
*
infoPtr
,
INT
index
)
{
{
TRACE
(
"
\n
"
);
TRACE
(
"
\n
"
);
switch
(
(
int
)
wParam
)
{
switch
(
index
)
{
case
MCSC_BACKGROUND
:
case
MCSC_BACKGROUND
:
return
infoPtr
->
bk
;
return
infoPtr
->
bk
;
case
MCSC_TEXT
:
case
MCSC_TEXT
:
...
@@ -834,13 +834,13 @@ MONTHCAL_GetMonthDelta(const MONTHCAL_INFO *infoPtr)
...
@@ -834,13 +834,13 @@ MONTHCAL_GetMonthDelta(const MONTHCAL_INFO *infoPtr)
static
LRESULT
static
LRESULT
MONTHCAL_SetMonthDelta
(
MONTHCAL_INFO
*
infoPtr
,
WPARAM
wParam
)
MONTHCAL_SetMonthDelta
(
MONTHCAL_INFO
*
infoPtr
,
INT
delta
)
{
{
int
prev
=
infoPtr
->
delta
;
INT
prev
=
infoPtr
->
delta
;
TRACE
(
"delta %
ld
\n
"
,
wParam
);
TRACE
(
"delta %
d
\n
"
,
delta
);
infoPtr
->
delta
=
(
int
)
wParam
;
infoPtr
->
delta
=
delta
;
return
prev
;
return
prev
;
}
}
...
@@ -1645,21 +1645,21 @@ done:
...
@@ -1645,21 +1645,21 @@ done:
static
LRESULT
static
LRESULT
MONTHCAL_Paint
(
MONTHCAL_INFO
*
infoPtr
,
WPARAM
wParam
)
MONTHCAL_Paint
(
MONTHCAL_INFO
*
infoPtr
,
HDC
hdc_paint
)
{
{
HDC
hdc
;
HDC
hdc
;
PAINTSTRUCT
ps
;
PAINTSTRUCT
ps
;
if
(
wParam
)
if
(
hdc_paint
)
{
{
GetClientRect
(
infoPtr
->
hwndSelf
,
&
ps
.
rcPaint
);
GetClientRect
(
infoPtr
->
hwndSelf
,
&
ps
.
rcPaint
);
hdc
=
(
HDC
)
wParam
;
hdc
=
hdc_paint
;
}
}
else
else
hdc
=
BeginPaint
(
infoPtr
->
hwndSelf
,
&
ps
);
hdc
=
BeginPaint
(
infoPtr
->
hwndSelf
,
&
ps
);
MONTHCAL_Refresh
(
infoPtr
,
hdc
,
&
ps
);
MONTHCAL_Refresh
(
infoPtr
,
hdc
,
&
ps
);
if
(
!
wParam
)
EndPaint
(
infoPtr
->
hwndSelf
,
&
ps
);
if
(
!
hdc_paint
)
EndPaint
(
infoPtr
->
hwndSelf
,
&
ps
);
return
0
;
return
0
;
}
}
...
@@ -2011,7 +2011,7 @@ MONTHCAL_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
...
@@ -2011,7 +2011,7 @@ MONTHCAL_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case
WM_PRINTCLIENT
:
case
WM_PRINTCLIENT
:
case
WM_PAINT
:
case
WM_PAINT
:
return
MONTHCAL_Paint
(
infoPtr
,
wParam
);
return
MONTHCAL_Paint
(
infoPtr
,
(
HDC
)
wParam
);
case
WM_SETFOCUS
:
case
WM_SETFOCUS
:
return
MONTHCAL_SetFocus
(
infoPtr
);
return
MONTHCAL_SetFocus
(
infoPtr
);
...
...
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