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
2c2e3f86
Commit
2c2e3f86
authored
May 19, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
May 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Verify we got a valid window handle in GetDCEx().
parent
9d865274
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
painting.c
dlls/user32/painting.c
+2
-0
dce.c
dlls/user32/tests/dce.c
+24
-0
No files found.
dlls/user32/painting.c
View file @
2c2e3f86
...
@@ -908,6 +908,8 @@ HDC WINAPI GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags )
...
@@ -908,6 +908,8 @@ HDC WINAPI GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags )
TRACE
(
"hwnd %p, hrgnClip %p, flags %08x
\n
"
,
hwnd
,
hrgnClip
,
flags
);
TRACE
(
"hwnd %p, hrgnClip %p, flags %08x
\n
"
,
hwnd
,
hrgnClip
,
flags
);
if
(
!
IsWindow
(
hwnd
))
return
0
;
/* fixup flags */
/* fixup flags */
if
(
flags
&
(
DCX_WINDOW
|
DCX_PARENTCLIP
))
flags
|=
DCX_CACHE
;
if
(
flags
&
(
DCX_WINDOW
|
DCX_PARENTCLIP
))
flags
|=
DCX_CACHE
;
...
...
dlls/user32/tests/dce.c
View file @
2c2e3f86
...
@@ -392,6 +392,23 @@ static void test_invisible_create(void)
...
@@ -392,6 +392,23 @@ static void test_invisible_create(void)
DestroyWindow
(
hwnd_owndc
);
DestroyWindow
(
hwnd_owndc
);
}
}
static
void
test_destroyed_window
(
void
)
{
HDC
dc
;
dc
=
GetDCEx
(
hwnd_cache
,
0
,
DCX_USESTYLE
);
ok
(
!
dc
,
"Got a non-NULL DC (%p) for a destroyed window.
\n
"
,
dc
);
dc
=
GetDCEx
(
hwnd_owndc
,
0
,
DCX_USESTYLE
);
ok
(
!
dc
,
"Got a non-NULL DC (%p) for a destroyed window.
\n
"
,
dc
);
dc
=
GetDCEx
(
hwnd_classdc
,
0
,
DCX_USESTYLE
);
ok
(
!
dc
,
"Got a non-NULL DC (%p) for a destroyed window.
\n
"
,
dc
);
dc
=
GetDCEx
(
hwnd_classdc2
,
0
,
DCX_USESTYLE
);
ok
(
!
dc
,
"Got a non-NULL DC (%p) for a destroyed window.
\n
"
,
dc
);
}
START_TEST
(
dce
)
START_TEST
(
dce
)
{
{
WNDCLASSA
cls
;
WNDCLASSA
cls
;
...
@@ -431,4 +448,11 @@ START_TEST(dce)
...
@@ -431,4 +448,11 @@ START_TEST(dce)
test_dc_visrgn
();
test_dc_visrgn
();
test_begin_paint
();
test_begin_paint
();
test_invisible_create
();
test_invisible_create
();
DestroyWindow
(
hwnd_classdc2
);
DestroyWindow
(
hwnd_classdc
);
DestroyWindow
(
hwnd_owndc
);
DestroyWindow
(
hwnd_cache
);
test_destroyed_window
();
}
}
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