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
e95464a5
Commit
e95464a5
authored
Nov 29, 2005
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Nov 29, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EnumChildWindows should return result from the callback.
parent
eea60a66
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
2 deletions
+38
-2
win.c
dlls/user/tests/win.c
+35
-0
win.c
dlls/user/win.c
+3
-2
No files found.
dlls/user/tests/win.c
View file @
e95464a5
...
...
@@ -86,6 +86,13 @@ static void check_parents( HWND hwnd, HWND ga_parent, HWND gwl_parent, HWND get_
}
}
BOOL
CALLBACK
EnumChildProc
(
HWND
hwndChild
,
LPARAM
lParam
)
{
(
*
(
LPINT
)
lParam
)
++
;
trace
(
"EnumChildProc on %p
\n
"
,
hwndChild
);
if
(
*
(
LPINT
)
lParam
>
1
)
return
FALSE
;
return
TRUE
;
}
static
HWND
create_tool_window
(
LONG
style
,
HWND
parent
)
{
...
...
@@ -102,6 +109,7 @@ static void test_parent_owner(void)
HWND
test
,
owner
,
ret
;
HWND
desktop
=
GetDesktopWindow
();
HWND
child
=
create_tool_window
(
WS_CHILD
,
hwndMain
);
INT
numChildren
;
trace
(
"main window %p main2 %p desktop %p child %p
\n
"
,
hwndMain
,
hwndMain2
,
desktop
,
child
);
...
...
@@ -440,6 +448,33 @@ static void test_parent_owner(void)
/* final cleanup */
DestroyWindow
(
child
);
owner
=
create_tool_window
(
WS_OVERLAPPED
,
0
);
test
=
create_tool_window
(
WS_POPUP
,
NULL
);
numChildren
=
0
;
ok
(
!
EnumChildWindows
(
owner
,
EnumChildProc
,
(
LPARAM
)
&
numChildren
),
"EnumChildWindows should have returned FALSE
\n
"
);
ok
(
numChildren
==
0
,
"numChildren should be 0 got %d
\n
"
,
numChildren
);
SetWindowLongA
(
test
,
GWL_STYLE
,
(
GetWindowLongA
(
test
,
GWL_STYLE
)
&
~
WS_POPUP
)
|
WS_CHILD
);
ret
=
SetParent
(
test
,
owner
);
ok
(
ret
==
desktop
,
"SetParent return value %p expected %p
\n
"
,
ret
,
desktop
);
numChildren
=
0
;
ok
(
EnumChildWindows
(
owner
,
EnumChildProc
,
(
LPARAM
)
&
numChildren
),
"EnumChildWindows should have returned TRUE
\n
"
);
ok
(
numChildren
==
1
,
"numChildren should be 1 got %d
\n
"
,
numChildren
);
child
=
create_tool_window
(
WS_CHILD
,
owner
);
numChildren
=
0
;
ok
(
!
EnumChildWindows
(
owner
,
EnumChildProc
,
(
LPARAM
)
&
numChildren
),
"EnumChildWindows should have returned FALSE
\n
"
);
ok
(
numChildren
==
2
,
"numChildren should be 2 got %d
\n
"
,
numChildren
);
DestroyWindow
(
child
);
DestroyWindow
(
test
);
DestroyWindow
(
owner
);
}
...
...
dlls/user/win.c
View file @
e95464a5
...
...
@@ -2836,13 +2836,14 @@ static BOOL WIN_EnumChildWindows( HWND *list, WNDENUMPROC func, LPARAM lParam )
BOOL
WINAPI
EnumChildWindows
(
HWND
parent
,
WNDENUMPROC
func
,
LPARAM
lParam
)
{
HWND
*
list
;
BOOL
ret
;
USER_CheckNotLock
();
if
(
!
(
list
=
WIN_ListChildren
(
parent
)))
return
FALSE
;
WIN_EnumChildWindows
(
list
,
func
,
lParam
);
ret
=
WIN_EnumChildWindows
(
list
,
func
,
lParam
);
HeapFree
(
GetProcessHeap
(),
0
,
list
);
return
TRUE
;
return
ret
;
}
...
...
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