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
7bfc2902
Commit
7bfc2902
authored
Mar 30, 2005
by
Alex Villacís Lasso
Committed by
Alexandre Julliard
Mar 30, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initialize [orig|himetric][Width|Height] for PICTYPE_ICON case.
parent
f74b0adb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
olepicture.c
dlls/oleaut32/olepicture.c
+32
-0
No files found.
dlls/oleaut32/olepicture.c
View file @
7bfc2902
...
...
@@ -185,6 +185,36 @@ static void OLEPictureImpl_SetBitmap(OLEPictureImpl*This) {
DeleteDC
(
hdcRef
);
}
static
void
OLEPictureImpl_SetIcon
(
OLEPictureImpl
*
This
)
{
ICONINFO
infoIcon
;
TRACE
(
"icon handle %p
\n
"
,
This
->
desc
.
u
.
icon
.
hicon
);
if
(
GetIconInfo
(
This
->
desc
.
u
.
icon
.
hicon
,
&
infoIcon
))
{
HDC
hdcRef
;
BITMAP
bm
;
TRACE
(
"bitmap handle for icon is %p
\n
"
,
infoIcon
.
hbmColor
);
if
(
GetObjectA
(
infoIcon
.
hbmColor
?
infoIcon
.
hbmColor
:
infoIcon
.
hbmMask
,
sizeof
(
bm
),
&
bm
)
!=
sizeof
(
bm
))
{
ERR
(
"GetObject fails on icon bitmap
\n
"
);
return
;
}
This
->
origWidth
=
bm
.
bmWidth
;
This
->
origHeight
=
infoIcon
.
hbmColor
?
bm
.
bmHeight
:
bm
.
bmHeight
/
2
;
/* see comment on HIMETRIC on OLEPictureImpl_SetBitmap() */
hdcRef
=
GetDC
(
0
);
This
->
himetricWidth
=
(
This
->
origWidth
*
2540
)
/
GetDeviceCaps
(
hdcRef
,
LOGPIXELSX
);
This
->
himetricHeight
=
(
This
->
origHeight
*
2540
)
/
GetDeviceCaps
(
hdcRef
,
LOGPIXELSY
);
ReleaseDC
(
0
,
hdcRef
);
DeleteObject
(
infoIcon
.
hbmMask
);
if
(
infoIcon
.
hbmColor
)
DeleteObject
(
infoIcon
.
hbmColor
);
}
else
{
ERR
(
"GetIconInfo() fails on icon %p
\n
"
,
This
->
desc
.
u
.
icon
.
hicon
);
}
}
/************************************************************************
* OLEPictureImpl_Construct
*
...
...
@@ -260,6 +290,8 @@ static OLEPictureImpl* OLEPictureImpl_Construct(LPPICTDESC pictDesc, BOOL fOwn)
break
;
case
PICTYPE_ICON
:
OLEPictureImpl_SetIcon
(
newObject
);
break
;
case
PICTYPE_ENHMETAFILE
:
default:
FIXME
(
"Unsupported type %d
\n
"
,
pictDesc
->
picType
);
...
...
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