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
3796f127
Commit
3796f127
authored
Mar 26, 2011
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/monthcal: Clean day painting function.
parent
802ab38f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
18 deletions
+13
-18
monthcal.c
dlls/comctl32/monthcal.c
+13
-18
No files found.
dlls/comctl32/monthcal.c
View file @
3796f127
...
...
@@ -666,20 +666,18 @@ static void MONTHCAL_DrawDay(const MONTHCAL_INFO *infoPtr, HDC hdc, const SYSTEM
static
const
WCHAR
fmtW
[]
=
{
'%'
,
'd'
,
0
};
WCHAR
buf
[
10
];
RECT
r
,
r_temp
;
static
BOOL
bold_selected
;
BOOL
selected_day
=
FALSE
;
COLORREF
oldCol
=
0
;
COLORREF
oldBk
=
0
;
INT
old_bkmode
,
selection
;
/* No need to check styles: when selection is not valid, it is set to zero.
* 1<day<31, so everything is OK.
*/
/* no need to check styles: when selection is not valid, it is set to zero.
1 < day < 31, so everything is OK */
MONTHCAL_CalcPosFromDay
(
infoPtr
,
st
,
&
r
);
if
(
!
IntersectRect
(
&
r_temp
,
&
(
ps
->
rcPaint
),
&
r
))
return
;
if
((
MONTHCAL_CompareDate
(
st
,
&
infoPtr
->
minSel
)
>=
0
)
&&
(
MONTHCAL_CompareDate
(
st
,
&
infoPtr
->
maxSel
)
<=
0
))
{
(
MONTHCAL_CompareDate
(
st
,
&
infoPtr
->
maxSel
)
<=
0
))
{
TRACE
(
"%d %d %d
\n
"
,
st
->
wDay
,
infoPtr
->
minSel
.
wDay
,
infoPtr
->
maxSel
.
wDay
);
TRACE
(
"%s
\n
"
,
wine_dbgstr_rect
(
&
r
));
...
...
@@ -687,23 +685,20 @@ static void MONTHCAL_DrawDay(const MONTHCAL_INFO *infoPtr, HDC hdc, const SYSTEM
oldBk
=
SetBkColor
(
hdc
,
infoPtr
->
colors
[
MCSC_TRAILINGTEXT
]);
FillRect
(
hdc
,
&
r
,
infoPtr
->
brushes
[
MCSC_TITLEBK
]);
select
ed_day
=
TRUE
;
select
ion
=
1
;
}
else
selection
=
0
;
if
(
bold
&&
!
bold_selected
)
{
SelectObject
(
hdc
,
infoPtr
->
hBoldFont
);
bold_selected
=
TRUE
;
}
if
(
!
bold
&&
bold_selected
)
{
SelectObject
(
hdc
,
infoPtr
->
hFont
);
bold_selected
=
FALSE
;
}
SelectObject
(
hdc
,
bold
?
infoPtr
->
hBoldFont
:
infoPtr
->
hFont
);
SetBkMode
(
hdc
,
TRANSPARENT
);
old_bkmode
=
SetBkMode
(
hdc
,
TRANSPARENT
);
wsprintfW
(
buf
,
fmtW
,
st
->
wDay
);
DrawTextW
(
hdc
,
buf
,
-
1
,
&
r
,
DT_CENTER
|
DT_VCENTER
|
DT_SINGLELINE
);
SetBkMode
(
hdc
,
old_bkmode
);
if
(
selected_day
)
{
if
(
selection
)
{
SetTextColor
(
hdc
,
oldCol
);
SetBkColor
(
hdc
,
oldBk
);
}
...
...
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