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
0af447ce
Commit
0af447ce
authored
Apr 23, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 25, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Add some GetDlgItem() tests regarding children windows Z-order.
parent
57b55f36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
8 deletions
+43
-8
dialog.c
dlls/user32/tests/dialog.c
+43
-8
No files found.
dlls/user32/tests/dialog.c
View file @
0af447ce
...
...
@@ -338,7 +338,7 @@ static int id (HWND h)
* (tab test)
*/
static
void
GetNextDlgItemTest
(
void
)
static
void
test_GetNextDlgItem
(
void
)
{
static
test_record
test
[]
=
{
...
...
@@ -574,7 +574,7 @@ static BOOL RegisterWindowClasses (void)
return
TRUE
;
}
static
void
WM_NEXTDLGCTLTest
(
void
)
static
void
test_WM_NEXTDLGCTL
(
void
)
{
DWORD
dwVal
;
...
...
@@ -681,7 +681,7 @@ static void WM_NEXTDLGCTLTest(void)
DestroyWindow
(
g_hwndTestDlg
);
}
static
void
IsDialogMessageWTest
(
void
)
static
void
test_IsDialogMessage
(
void
)
{
MSG
msg
;
...
...
@@ -795,7 +795,7 @@ static const char * GetHwndString(HWND hw)
return
"unknown handle"
;
}
static
void
InitialFocusTest
(
void
)
static
void
test_initial_focus
(
void
)
{
/* Test 1:
* This test intentionally returns FALSE in response to WM_INITDIALOG
...
...
@@ -897,6 +897,40 @@ static void test_GetDlgItemText(void)
"string retrieved using GetDlgItemText should have been NULL terminated
\n
"
);
}
static
void
test_GetDlgItem
(
void
)
{
HWND
hwnd
,
child1
,
child2
,
hwnd2
;
BOOL
ret
;
hwnd
=
CreateWindowA
(
"button"
,
"parent"
,
WS_VISIBLE
,
0
,
0
,
100
,
100
,
NULL
,
0
,
g_hinst
,
NULL
);
ok
(
hwnd
!=
NULL
,
"failed to created window
\n
"
);
/* created with the same ID */
child1
=
CreateWindowA
(
"button"
,
"child1"
,
WS_VISIBLE
|
WS_CHILD
,
0
,
0
,
10
,
10
,
hwnd
,
0
,
g_hinst
,
NULL
);
ok
(
child1
!=
NULL
,
"failed to create first child
\n
"
);
child2
=
CreateWindowA
(
"button"
,
"child2"
,
WS_VISIBLE
|
WS_CHILD
,
0
,
0
,
10
,
10
,
hwnd
,
0
,
g_hinst
,
NULL
);
ok
(
child2
!=
NULL
,
"failed to create second child
\n
"
);
hwnd2
=
GetDlgItem
(
hwnd
,
0
);
ok
(
hwnd2
==
child1
,
"expected first child, got %p
\n
"
,
hwnd2
);
hwnd2
=
GetTopWindow
(
hwnd
);
ok
(
hwnd2
==
child1
,
"expected first child to be top, got %p
\n
"
,
hwnd2
);
ret
=
SetWindowPos
(
child1
,
child2
,
0
,
0
,
0
,
0
,
SWP_NOMOVE
);
ok
(
ret
,
"got %d
\n
"
,
ret
);
hwnd2
=
GetTopWindow
(
hwnd
);
ok
(
hwnd2
==
child2
,
"expected second child to be top, got %p
\n
"
,
hwnd2
);
/* top window from child list is picked */
hwnd2
=
GetDlgItem
(
hwnd
,
0
);
ok
(
hwnd2
==
child2
,
"expected second child, got %p
\n
"
,
hwnd2
);
DestroyWindow
(
child1
);
DestroyWindow
(
child2
);
DestroyWindow
(
hwnd
);
}
static
INT_PTR
CALLBACK
DestroyDlgWinProc
(
HWND
hDlg
,
UINT
uiMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
...
...
@@ -1212,10 +1246,11 @@ START_TEST(dialog)
if
(
!
RegisterWindowClasses
())
assert
(
0
);
GetNextDlgItemTest
();
IsDialogMessageWTest
();
WM_NEXTDLGCTLTest
();
InitialFocusTest
();
test_GetNextDlgItem
();
test_IsDialogMessage
();
test_WM_NEXTDLGCTL
();
test_initial_focus
();
test_GetDlgItem
();
test_GetDlgItemText
();
test_DialogBoxParamA
();
test_DisabledDialogTest
();
...
...
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