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
971a66e9
Commit
971a66e9
authored
May 06, 2012
by
Daniel Jelinski
Committed by
Alexandre Julliard
May 07, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Added support for loading cursors in OLEPicture.
parent
c38ba3a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
12 deletions
+30
-12
olepicture.c
dlls/oleaut32/olepicture.c
+30
-12
No files found.
dlls/oleaut32/olepicture.c
View file @
971a66e9
...
...
@@ -1228,16 +1228,34 @@ static HRESULT OLEPictureImpl_LoadIcon(OLEPictureImpl *This, BYTE *xbuf, ULONG x
}
if
(
i
==
cifd
->
idCount
)
i
=
0
;
}
hicon
=
CreateIconFromResourceEx
(
xbuf
+
cifd
->
idEntries
[
i
].
dwDIBOffset
,
cifd
->
idEntries
[
i
].
dwDIBSize
,
TRUE
,
/* is icon */
0x00030000
,
cifd
->
idEntries
[
i
].
bWidth
,
cifd
->
idEntries
[
i
].
bHeight
,
0
);
if
(
cifd
->
idType
==
2
)
{
LPBYTE
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
cifd
->
idEntries
[
i
].
dwDIBSize
+
4
);
memcpy
(
buf
,
&
cifd
->
idEntries
[
i
].
xHotspot
,
4
);
memcpy
(
buf
+
4
,
xbuf
+
cifd
->
idEntries
[
i
].
dwDIBOffset
,
cifd
->
idEntries
[
i
].
dwDIBSize
);
hicon
=
CreateIconFromResourceEx
(
buf
,
cifd
->
idEntries
[
i
].
dwDIBSize
+
4
,
FALSE
,
/* is cursor */
0x00030000
,
cifd
->
idEntries
[
i
].
bWidth
,
cifd
->
idEntries
[
i
].
bHeight
,
0
);
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
}
else
{
hicon
=
CreateIconFromResourceEx
(
xbuf
+
cifd
->
idEntries
[
i
].
dwDIBOffset
,
cifd
->
idEntries
[
i
].
dwDIBSize
,
TRUE
,
/* is icon */
0x00030000
,
cifd
->
idEntries
[
i
].
bWidth
,
cifd
->
idEntries
[
i
].
bHeight
,
0
);
}
if
(
!
hicon
)
{
ERR
(
"CreateIcon failed.
\n
"
);
return
E_FAIL
;
...
...
@@ -1322,7 +1340,7 @@ static HRESULT OLEPictureImpl_LoadAPM(OLEPictureImpl *This,
* DWORD magic;
* DWORD len;
*
* Currently implemented: BITMAP, ICON, JPEG, GIF, WMF, EMF
* Currently implemented: BITMAP, ICON,
CURSOR,
JPEG, GIF, WMF, EMF
*/
static
HRESULT
WINAPI
OLEPictureImpl_Load
(
IPersistStream
*
iface
,
IStream
*
pStm
)
{
HRESULT
hr
;
...
...
@@ -1477,7 +1495,7 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface, IStream *pStm)
case
BITMAP_FORMAT_APM
:
/* APM */
hr
=
OLEPictureImpl_LoadAPM
(
This
,
xbuf
,
xread
);
break
;
case
0x0000
:
{
/* ICON , first word is dwReserved */
case
0x0000
:
{
/* ICON
or CURSOR
, first word is dwReserved */
hr
=
OLEPictureImpl_LoadIcon
(
This
,
xbuf
,
xread
);
break
;
}
...
...
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