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
b486c505
Commit
b486c505
authored
Jul 19, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/monthcal: Use memcpy to copy day state arrays.
parent
fdabf10a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
monthcal.c
dlls/comctl32/monthcal.c
+3
-8
No files found.
dlls/comctl32/monthcal.c
View file @
b486c505
...
...
@@ -1384,13 +1384,10 @@ MONTHCAL_GetRange(const MONTHCAL_INFO *infoPtr, SYSTEMTIME *range)
static
LRESULT
MONTHCAL_SetDayState
(
const
MONTHCAL_INFO
*
infoPtr
,
INT
months
,
MONTHDAYSTATE
*
states
)
{
int
i
;
TRACE
(
"%d %p
\n
"
,
months
,
states
);
TRACE
(
"%p %d %p
\n
"
,
infoPtr
,
months
,
states
);
if
(
months
!=
infoPtr
->
monthRange
)
return
0
;
for
(
i
=
0
;
i
<
months
;
i
++
)
infoPtr
->
monthdayState
[
i
]
=
states
[
i
];
memcpy
(
infoPtr
->
monthdayState
,
states
,
months
*
sizeof
(
MONTHDAYSTATE
));
return
1
;
}
...
...
@@ -1748,7 +1745,6 @@ static void MONTHCAL_NotifyDayState(MONTHCAL_INFO *infoPtr)
{
if
(
infoPtr
->
dwStyle
&
MCS_DAYSTATE
)
{
NMDAYSTATE
nmds
;
INT
i
;
nmds
.
nmhdr
.
hwndFrom
=
infoPtr
->
hwndSelf
;
nmds
.
nmhdr
.
idFrom
=
GetWindowLongPtrW
(
infoPtr
->
hwndSelf
,
GWLP_ID
);
...
...
@@ -1762,8 +1758,7 @@ static void MONTHCAL_NotifyDayState(MONTHCAL_INFO *infoPtr)
nmds
.
stStart
.
wDay
=
1
;
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
nmds
.
nmhdr
.
idFrom
,
(
LPARAM
)
&
nmds
);
for
(
i
=
0
;
i
<
infoPtr
->
monthRange
;
i
++
)
infoPtr
->
monthdayState
[
i
]
=
nmds
.
prgDayState
[
i
];
memcpy
(
infoPtr
->
monthdayState
,
nmds
.
prgDayState
,
infoPtr
->
monthRange
*
sizeof
(
MONTHDAYSTATE
));
Free
(
nmds
.
prgDayState
);
}
...
...
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