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
e410f273
Commit
e410f273
authored
Mar 25, 2015
by
Huw Davies
Committed by
Alexandre Julliard
Mar 25, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Add support for retrieving extents of dib format.
parent
bbba2c00
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
datacache.c
dlls/ole32/datacache.c
+35
-0
No files found.
dlls/ole32/datacache.c
View file @
e410f273
...
...
@@ -1846,6 +1846,41 @@ static HRESULT WINAPI DataCache_GetExtent(
return
S_OK
;
}
case
CF_DIB
:
{
BITMAPFILEHEADER
*
file_head
;
BITMAPINFOHEADER
*
info
;
LONG
x_pels_m
,
y_pels_m
;
if
((
cache_entry
->
stgmedium
.
tymed
!=
TYMED_HGLOBAL
)
||
!
((
file_head
=
GlobalLock
(
cache_entry
->
stgmedium
.
u
.
hGlobal
))))
continue
;
info
=
(
BITMAPINFOHEADER
*
)(
file_head
+
1
);
x_pels_m
=
info
->
biXPelsPerMeter
;
y_pels_m
=
info
->
biYPelsPerMeter
;
/* Size in units of 0.01mm (ie. MM_HIMETRIC) */
if
(
x_pels_m
!=
0
&&
y_pels_m
!=
0
)
{
lpsizel
->
cx
=
info
->
biWidth
*
100000
/
x_pels_m
;
lpsizel
->
cy
=
info
->
biHeight
*
100000
/
y_pels_m
;
}
else
{
HDC
hdc
=
GetDC
(
0
);
lpsizel
->
cx
=
info
->
biWidth
*
2540
/
GetDeviceCaps
(
hdc
,
LOGPIXELSX
);
lpsizel
->
cy
=
info
->
biHeight
*
2540
/
GetDeviceCaps
(
hdc
,
LOGPIXELSY
);
ReleaseDC
(
0
,
hdc
);
}
GlobalUnlock
(
cache_entry
->
stgmedium
.
u
.
hGlobal
);
return
S_OK
;
}
}
}
...
...
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