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
57b25bcf
Commit
57b25bcf
authored
Jul 08, 2008
by
Vincent Povirk
Committed by
Alexandre Julliard
Jul 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Add test for disabling owner of modal property sheets.
parent
e19a9041
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
0 deletions
+68
-0
propsheet.c
dlls/comctl32/tests/propsheet.c
+68
-0
No files found.
dlls/comctl32/tests/propsheet.c
View file @
57b25bcf
...
...
@@ -22,6 +22,8 @@
#include "wine/test.h"
static
HWND
parent
;
static
int
CALLBACK
sheet_callback
(
HWND
hwnd
,
UINT
msg
,
LPARAM
lparam
)
{
switch
(
msg
)
...
...
@@ -132,8 +134,74 @@ static void test_nopage(void)
DestroyWindow
(
hdlg
);
}
static
int
CALLBACK
disableowner_callback
(
HWND
hwnd
,
UINT
msg
,
LPARAM
lparam
)
{
switch
(
msg
)
{
case
PSCB_INITIALIZED
:
{
todo_wine
ok
(
IsWindowEnabled
(
parent
)
==
0
,
"parent window should be disabled
\n
"
);
PostQuitMessage
(
0
);
return
FALSE
;
}
}
return
FALSE
;
}
static
void
register_parent_wnd_class
(
void
)
{
WNDCLASSA
cls
;
cls
.
style
=
0
;
cls
.
lpfnWndProc
=
DefWindowProcA
;
cls
.
cbClsExtra
=
0
;
cls
.
cbWndExtra
=
0
;
cls
.
hInstance
=
GetModuleHandleA
(
NULL
);
cls
.
hIcon
=
0
;
cls
.
hCursor
=
LoadCursorA
(
0
,
(
LPSTR
)
IDC_ARROW
);
cls
.
hbrBackground
=
GetStockObject
(
WHITE_BRUSH
);
cls
.
lpszMenuName
=
NULL
;
cls
.
lpszClassName
=
"parent class"
;
RegisterClassA
(
&
cls
);
}
static
void
test_disableowner
(
void
)
{
HPROPSHEETPAGE
hpsp
[
1
];
PROPSHEETPAGEA
psp
;
PROPSHEETHEADERA
psh
;
register_parent_wnd_class
();
parent
=
CreateWindowA
(
"parent class"
,
""
,
WS_CAPTION
|
WS_SYSMENU
|
WS_VISIBLE
,
100
,
100
,
100
,
100
,
GetDesktopWindow
(),
NULL
,
GetModuleHandleA
(
NULL
),
0
);
memset
(
&
psp
,
0
,
sizeof
(
psp
));
psp
.
dwSize
=
sizeof
(
psp
);
psp
.
dwFlags
=
0
;
psp
.
hInstance
=
GetModuleHandleW
(
NULL
);
U
(
psp
).
pszTemplate
=
"prop_page1"
;
U2
(
psp
).
pszIcon
=
NULL
;
psp
.
pfnDlgProc
=
NULL
;
psp
.
lParam
=
0
;
hpsp
[
0
]
=
CreatePropertySheetPageA
(
&
psp
);
memset
(
&
psh
,
0
,
sizeof
(
psh
));
psh
.
dwSize
=
sizeof
(
psh
);
psh
.
dwFlags
=
PSH_USECALLBACK
;
psh
.
pszCaption
=
"test caption"
;
psh
.
nPages
=
1
;
psh
.
hwndParent
=
parent
;
U3
(
psh
).
phpage
=
hpsp
;
psh
.
pfnCallback
=
disableowner_callback
;
PropertySheetA
(
&
psh
);
ok
(
IsWindowEnabled
(
parent
)
!=
0
,
"parent window should be enabled
\n
"
);
DestroyWindow
(
parent
);
}
START_TEST
(
propsheet
)
{
test_title
();
test_nopage
();
test_disableowner
();
}
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