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
9c30236d
Commit
9c30236d
authored
Aug 09, 2007
by
Evan Stade
Committed by
Alexandre Julliard
Aug 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Replace GetDC(0) with CreateCompatibleDC(0).
parent
94a19d1f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
image.c
dlls/gdiplus/image.c
+6
-6
No files found.
dlls/gdiplus/image.c
View file @
9c30236d
...
@@ -130,7 +130,7 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect,
...
@@ -130,7 +130,7 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect,
bmi
.
bmiHeader
.
biBitCount
=
0
;
bmi
.
bmiHeader
.
biBitCount
=
0
;
if
(
!
bm_is_selected
){
if
(
!
bm_is_selected
){
hdc
=
Get
DC
(
0
);
hdc
=
CreateCompatible
DC
(
0
);
old
=
SelectObject
(
hdc
,
(
HBITMAP
)
hbm
);
old
=
SelectObject
(
hdc
,
(
HBITMAP
)
hbm
);
}
}
...
@@ -149,7 +149,7 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect,
...
@@ -149,7 +149,7 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect,
if
(
!
bm_is_selected
){
if
(
!
bm_is_selected
){
SelectObject
(
hdc
,
old
);
SelectObject
(
hdc
,
old
);
ReleaseDC
(
0
,
hdc
);
DeleteDC
(
hdc
);
}
}
lockeddata
->
Width
=
rect
->
Width
;
lockeddata
->
Width
=
rect
->
Width
;
...
@@ -210,7 +210,7 @@ GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap* bitmap,
...
@@ -210,7 +210,7 @@ GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap* bitmap,
bmi
.
bmiHeader
.
biBitCount
=
0
;
bmi
.
bmiHeader
.
biBitCount
=
0
;
if
(
!
bm_is_selected
){
if
(
!
bm_is_selected
){
hdc
=
Get
DC
(
0
);
hdc
=
CreateCompatible
DC
(
0
);
old
=
SelectObject
(
hdc
,
(
HBITMAP
)
hbm
);
old
=
SelectObject
(
hdc
,
(
HBITMAP
)
hbm
);
}
}
...
@@ -221,7 +221,7 @@ GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap* bitmap,
...
@@ -221,7 +221,7 @@ GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap* bitmap,
if
(
!
bm_is_selected
){
if
(
!
bm_is_selected
){
SelectObject
(
hdc
,
old
);
SelectObject
(
hdc
,
old
);
ReleaseDC
(
0
,
hdc
);
DeleteDC
(
hdc
);
}
}
GdipFree
(
bitmap
->
bitmapbits
);
GdipFree
(
bitmap
->
bitmapbits
);
...
@@ -677,11 +677,11 @@ GpStatus WINGDIPAPI GdipLoadImageFromStream(IStream* stream, GpImage **image)
...
@@ -677,11 +677,11 @@ GpStatus WINGDIPAPI GdipLoadImageFromStream(IStream* stream, GpImage **image)
if
(
!
hdc
){
if
(
!
hdc
){
HBITMAP
old
;
HBITMAP
old
;
hdc
=
Get
DC
(
0
);
hdc
=
CreateCompatible
DC
(
0
);
old
=
SelectObject
(
hdc
,
(
HBITMAP
)
hbm
);
old
=
SelectObject
(
hdc
,
(
HBITMAP
)
hbm
);
GetDIBits
(
hdc
,
(
HBITMAP
)
hbm
,
0
,
0
,
NULL
,
&
bmi
,
DIB_RGB_COLORS
);
GetDIBits
(
hdc
,
(
HBITMAP
)
hbm
,
0
,
0
,
NULL
,
&
bmi
,
DIB_RGB_COLORS
);
SelectObject
(
hdc
,
old
);
SelectObject
(
hdc
,
old
);
ReleaseDC
(
0
,
hdc
);
DeleteDC
(
hdc
);
}
}
else
else
GetDIBits
(
hdc
,
(
HBITMAP
)
hbm
,
0
,
0
,
NULL
,
&
bmi
,
DIB_RGB_COLORS
);
GetDIBits
(
hdc
,
(
HBITMAP
)
hbm
,
0
,
0
,
NULL
,
&
bmi
,
DIB_RGB_COLORS
);
...
...
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