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
74f20546
Commit
74f20546
authored
Oct 23, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 23, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Fix class tests compilation with __WINESRC__ defined.
parent
3c4d7f0d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
39 deletions
+39
-39
class.c
dlls/user32/tests/class.c
+39
-39
No files found.
dlls/user32/tests/class.c
View file @
74f20546
...
@@ -201,9 +201,9 @@ static void ClassTest(HINSTANCE hInstance, BOOL global)
...
@@ -201,9 +201,9 @@ static void ClassTest(HINSTANCE hInstance, BOOL global)
static
void
check_style
(
const
char
*
name
,
int
must_exist
,
UINT
style
,
UINT
ignore
)
static
void
check_style
(
const
char
*
name
,
int
must_exist
,
UINT
style
,
UINT
ignore
)
{
{
WNDCLASS
wc
;
WNDCLASS
A
wc
;
if
(
GetClassInfo
(
0
,
name
,
&
wc
))
if
(
GetClassInfo
A
(
0
,
name
,
&
wc
))
{
{
ok
(
!
(
~
wc
.
style
&
style
&
~
ignore
),
"System class %s is missing bits %x (%08x/%08x)
\n
"
,
ok
(
!
(
~
wc
.
style
&
style
&
~
ignore
),
"System class %s is missing bits %x (%08x/%08x)
\n
"
,
name
,
~
wc
.
style
&
style
,
wc
.
style
,
style
);
name
,
~
wc
.
style
&
style
,
wc
.
style
,
style
);
...
@@ -237,8 +237,8 @@ static void test_styles(void)
...
@@ -237,8 +237,8 @@ static void test_styles(void)
static
void
check_class_
(
int
line
,
HINSTANCE
inst
,
const
char
*
name
,
const
char
*
menu_name
)
static
void
check_class_
(
int
line
,
HINSTANCE
inst
,
const
char
*
name
,
const
char
*
menu_name
)
{
{
WNDCLASS
wc
;
WNDCLASS
A
wc
;
UINT
atom
=
GetClassInfo
(
inst
,
name
,
&
wc
);
UINT
atom
=
GetClassInfo
A
(
inst
,
name
,
&
wc
);
ok_
(
__FILE__
,
line
)(
atom
,
"Class %s %p not found
\n
"
,
name
,
inst
);
ok_
(
__FILE__
,
line
)(
atom
,
"Class %s %p not found
\n
"
,
name
,
inst
);
if
(
atom
)
if
(
atom
)
{
{
...
@@ -259,7 +259,7 @@ static void check_instance_( int line, const char *name, HINSTANCE inst,
...
@@ -259,7 +259,7 @@ static void check_instance_( int line, const char *name, HINSTANCE inst,
WNDCLASSA
wc
;
WNDCLASSA
wc
;
HWND
hwnd
;
HWND
hwnd
;
ok_
(
__FILE__
,
line
)(
GetClassInfo
(
inst
,
name
,
&
wc
),
"Couldn't find class %s inst %p
\n
"
,
name
,
inst
);
ok_
(
__FILE__
,
line
)(
GetClassInfo
A
(
inst
,
name
,
&
wc
),
"Couldn't find class %s inst %p
\n
"
,
name
,
inst
);
ok_
(
__FILE__
,
line
)(
wc
.
hInstance
==
info_inst
,
"Wrong info instance %p/%p for class %s
\n
"
,
ok_
(
__FILE__
,
line
)(
wc
.
hInstance
==
info_inst
,
"Wrong info instance %p/%p for class %s
\n
"
,
wc
.
hInstance
,
info_inst
,
name
);
wc
.
hInstance
,
info_inst
,
name
);
hwnd
=
CreateWindowExA
(
0
,
name
,
"test_window"
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
inst
,
0
);
hwnd
=
CreateWindowExA
(
0
,
name
,
"test_window"
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
inst
,
0
);
...
@@ -363,7 +363,7 @@ static void test_instances(void)
...
@@ -363,7 +363,7 @@ static void test_instances(void)
wcexA
.
cbSize
=
sizeof
(
wcexA
);
wcexA
.
cbSize
=
sizeof
(
wcexA
);
ok
(
RegisterClassExA
(
&
wcexA
),
"Failed with valid number of cbSize bytes
\n
"
);
ok
(
RegisterClassExA
(
&
wcexA
),
"Failed with valid number of cbSize bytes
\n
"
);
wcexA
.
cbSize
=
0xdeadbeef
;
wcexA
.
cbSize
=
0xdeadbeef
;
ok
(
GetClassInfoEx
(
main_module
,
wcexA
.
lpszClassName
,
&
wcexA
),
"GetClassInfoEx failed
\n
"
);
ok
(
GetClassInfoEx
A
(
main_module
,
wcexA
.
lpszClassName
,
&
wcexA
),
"GetClassInfoEx failed
\n
"
);
ok
(
wcexA
.
cbSize
==
0xdeadbeef
,
"GetClassInfoEx returned wrong cbSize value %d
\n
"
,
wcexA
.
cbSize
);
ok
(
wcexA
.
cbSize
==
0xdeadbeef
,
"GetClassInfoEx returned wrong cbSize value %d
\n
"
,
wcexA
.
cbSize
);
UnregisterClassA
(
wcexA
.
lpszClassName
,
main_module
);
UnregisterClassA
(
wcexA
.
lpszClassName
,
main_module
);
...
@@ -411,13 +411,13 @@ static void test_instances(void)
...
@@ -411,13 +411,13 @@ static void test_instances(void)
check_class
(
kernel32
,
name
,
"kernel32"
);
check_class
(
kernel32
,
name
,
"kernel32"
);
check_instance
(
name
,
kernel32
,
kernel32
,
kernel32
);
check_instance
(
name
,
kernel32
,
kernel32
,
kernel32
);
check_thread_instance
(
name
,
kernel32
,
kernel32
,
kernel32
);
check_thread_instance
(
name
,
kernel32
,
kernel32
,
kernel32
);
ok
(
!
GetClassInfo
(
0
,
name
,
&
wc
),
"Class found with null instance
\n
"
);
ok
(
!
GetClassInfo
A
(
0
,
name
,
&
wc
),
"Class found with null instance
\n
"
);
ok
(
UnregisterClassA
(
name
,
kernel32
),
"Unregister failed for kernel32
\n
"
);
ok
(
UnregisterClassA
(
name
,
kernel32
),
"Unregister failed for kernel32
\n
"
);
/* GetClassInfo with instance 0 finds user32 instance */
/* GetClassInfo with instance 0 finds user32 instance */
SetClassLongPtrA
(
hwnd
,
GCLP_HMODULE
,
(
LONG_PTR
)
user32
);
SetClassLongPtrA
(
hwnd
,
GCLP_HMODULE
,
(
LONG_PTR
)
user32
);
ok
(
RegisterClassA
(
&
cls
),
"Failed to register local class for kernel32
\n
"
);
ok
(
RegisterClassA
(
&
cls
),
"Failed to register local class for kernel32
\n
"
);
if
(
!
GetClassInfo
(
0
,
name
,
&
wc
))
zero_instance
=
user32
;
/* instance 0 not supported on wow64 */
if
(
!
GetClassInfo
A
(
0
,
name
,
&
wc
))
zero_instance
=
user32
;
/* instance 0 not supported on wow64 */
else
else
{
{
check_instance
(
name
,
0
,
0
,
kernel32
);
check_instance
(
name
,
0
,
0
,
kernel32
);
...
@@ -440,7 +440,7 @@ static void test_instances(void)
...
@@ -440,7 +440,7 @@ static void test_instances(void)
check_instance
(
name
,
(
HINSTANCE
)
0x12345678
,
(
HINSTANCE
)
0x12345678
,
(
HINSTANCE
)
0x12345678
);
check_instance
(
name
,
(
HINSTANCE
)
0x12345678
,
(
HINSTANCE
)
0x12345678
,
(
HINSTANCE
)
0x12345678
);
check_thread_instance
(
name
,
kernel32
,
kernel32
,
kernel32
);
check_thread_instance
(
name
,
kernel32
,
kernel32
,
kernel32
);
check_thread_instance
(
name
,
(
HINSTANCE
)
0x12345678
,
(
HINSTANCE
)
0x12345678
,
(
HINSTANCE
)
0x12345678
);
check_thread_instance
(
name
,
(
HINSTANCE
)
0x12345678
,
(
HINSTANCE
)
0x12345678
,
(
HINSTANCE
)
0x12345678
);
ok
(
!
GetClassInfo
(
0
,
name
,
&
wc
),
"Class found with null instance
\n
"
);
ok
(
!
GetClassInfo
A
(
0
,
name
,
&
wc
),
"Class found with null instance
\n
"
);
/* creating a window with instance 0 uses the first class found */
/* creating a window with instance 0 uses the first class found */
cls
.
hInstance
=
(
HINSTANCE
)
0xdeadbeef
;
cls
.
hInstance
=
(
HINSTANCE
)
0xdeadbeef
;
...
@@ -458,7 +458,7 @@ static void test_instances(void)
...
@@ -458,7 +458,7 @@ static void test_instances(void)
"Didn't get kernel32 class for null instance
\n
"
);
"Didn't get kernel32 class for null instance
\n
"
);
DestroyWindow
(
hwnd2
);
DestroyWindow
(
hwnd2
);
r
=
GetClassName
(
hwnd
,
buffer
,
4
);
r
=
GetClassName
A
(
hwnd
,
buffer
,
4
);
ok
(
r
==
3
,
"expected 3, got %d
\n
"
,
r
);
ok
(
r
==
3
,
"expected 3, got %d
\n
"
,
r
);
ok
(
!
strcmp
(
buffer
,
"__t"
),
"name wrong: %s
\n
"
,
buffer
);
ok
(
!
strcmp
(
buffer
,
"__t"
),
"name wrong: %s
\n
"
,
buffer
);
...
@@ -484,7 +484,7 @@ static void test_instances(void)
...
@@ -484,7 +484,7 @@ static void test_instances(void)
check_class
(
main_module
,
name
,
"null"
);
check_class
(
main_module
,
name
,
"null"
);
check_instance
(
name
,
main_module
,
main_module
,
main_module
);
check_instance
(
name
,
main_module
,
main_module
,
main_module
);
check_thread_instance
(
name
,
main_module
,
main_module
,
main_module
);
check_thread_instance
(
name
,
main_module
,
main_module
,
main_module
);
ok
(
!
GetClassInfo
(
0
,
name
,
&
wc
),
"Class found with null instance
\n
"
);
ok
(
!
GetClassInfo
A
(
0
,
name
,
&
wc
),
"Class found with null instance
\n
"
);
ok
(
GetLastError
()
==
ERROR_CLASS_DOES_NOT_EXIST
,
"Wrong error code %d
\n
"
,
GetLastError
()
);
ok
(
GetLastError
()
==
ERROR_CLASS_DOES_NOT_EXIST
,
"Wrong error code %d
\n
"
,
GetLastError
()
);
ok
(
UnregisterClassA
(
name
,
0
),
"Unregister failed for null instance
\n
"
);
ok
(
UnregisterClassA
(
name
,
0
),
"Unregister failed for null instance
\n
"
);
...
@@ -581,12 +581,12 @@ static void test_instances(void)
...
@@ -581,12 +581,12 @@ static void test_instances(void)
check_thread_instance
(
"BUTTON"
,
user32
,
zero_instance
,
user32
);
check_thread_instance
(
"BUTTON"
,
user32
,
zero_instance
,
user32
);
/* we can unregister system classes */
/* we can unregister system classes */
ok
(
GetClassInfo
(
0
,
"BUTTON"
,
&
wc
),
"Button class not found with null instance
\n
"
);
ok
(
GetClassInfo
A
(
0
,
"BUTTON"
,
&
wc
),
"Button class not found with null instance
\n
"
);
ok
(
GetClassInfo
(
kernel32
,
"BUTTON"
,
&
wc
),
"Button class not found with kernel32
\n
"
);
ok
(
GetClassInfo
A
(
kernel32
,
"BUTTON"
,
&
wc
),
"Button class not found with kernel32
\n
"
);
ok
(
UnregisterClass
(
"BUTTON"
,
(
HINSTANCE
)
0x12345678
),
"Failed to unregister button
\n
"
);
ok
(
UnregisterClass
A
(
"BUTTON"
,
(
HINSTANCE
)
0x12345678
),
"Failed to unregister button
\n
"
);
ok
(
!
UnregisterClass
(
"BUTTON"
,
(
HINSTANCE
)
0x87654321
),
"Unregistered button a second time
\n
"
);
ok
(
!
UnregisterClass
A
(
"BUTTON"
,
(
HINSTANCE
)
0x87654321
),
"Unregistered button a second time
\n
"
);
ok
(
GetLastError
()
==
ERROR_CLASS_DOES_NOT_EXIST
,
"Wrong error code %d
\n
"
,
GetLastError
()
);
ok
(
GetLastError
()
==
ERROR_CLASS_DOES_NOT_EXIST
,
"Wrong error code %d
\n
"
,
GetLastError
()
);
ok
(
!
GetClassInfo
(
0
,
"BUTTON"
,
&
wc
),
"Button still exists
\n
"
);
ok
(
!
GetClassInfo
A
(
0
,
"BUTTON"
,
&
wc
),
"Button still exists
\n
"
);
/* last error not set reliably */
/* last error not set reliably */
/* we can change the instance of a system class */
/* we can change the instance of a system class */
...
@@ -624,10 +624,10 @@ static void test_builtinproc(void)
...
@@ -624,10 +624,10 @@ static void test_builtinproc(void)
HWND
hwnd
;
HWND
hwnd
;
int
i
;
int
i
;
pDefWindowProcA
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
(
"user32.dll"
),
"DefWindowProcA"
);
pDefWindowProcA
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
A
(
"user32.dll"
),
"DefWindowProcA"
);
pDefWindowProcW
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
(
"user32.dll"
),
"DefWindowProcW"
);
pDefWindowProcW
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
A
(
"user32.dll"
),
"DefWindowProcW"
);
pNtdllDefWindowProcA
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
(
"ntdll.dll"
),
"NtdllDefWindowProc_A"
);
pNtdllDefWindowProcA
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
A
(
"ntdll.dll"
),
"NtdllDefWindowProc_A"
);
pNtdllDefWindowProcW
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
(
"ntdll.dll"
),
"NtdllDefWindowProc_W"
);
pNtdllDefWindowProcW
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
A
(
"ntdll.dll"
),
"NtdllDefWindowProc_W"
);
/* On Vista+, the user32.dll export DefWindowProcA/W is forwarded to */
/* On Vista+, the user32.dll export DefWindowProcA/W is forwarded to */
/* ntdll.NtdllDefWindowProc_A/W. However, the wndproc returned by */
/* ntdll.NtdllDefWindowProc_A/W. However, the wndproc returned by */
...
@@ -641,7 +641,7 @@ static void test_builtinproc(void)
...
@@ -641,7 +641,7 @@ static void test_builtinproc(void)
{
{
ZeroMemory
(
&
cls
,
sizeof
(
cls
));
ZeroMemory
(
&
cls
,
sizeof
(
cls
));
cls
.
cbSize
=
sizeof
(
cls
);
cls
.
cbSize
=
sizeof
(
cls
);
cls
.
hInstance
=
GetModuleHandle
(
NULL
);
cls
.
hInstance
=
GetModuleHandle
A
(
NULL
);
cls
.
hbrBackground
=
GetStockObject
(
WHITE_BRUSH
);
cls
.
hbrBackground
=
GetStockObject
(
WHITE_BRUSH
);
if
(
i
&
1
)
if
(
i
&
1
)
cls
.
lpfnWndProc
=
pDefWindowProcA
;
cls
.
lpfnWndProc
=
pDefWindowProcA
;
...
@@ -660,7 +660,7 @@ static void test_builtinproc(void)
...
@@ -660,7 +660,7 @@ static void test_builtinproc(void)
}
}
ok
(
atom
!=
0
,
"Couldn't register class, i=%d, %d
\n
"
,
i
,
GetLastError
());
ok
(
atom
!=
0
,
"Couldn't register class, i=%d, %d
\n
"
,
i
,
GetLastError
());
hwnd
=
CreateWindowA
(
classA
,
NULL
,
0
,
0
,
0
,
100
,
100
,
NULL
,
NULL
,
GetModuleHandle
(
NULL
),
NULL
);
hwnd
=
CreateWindowA
(
classA
,
NULL
,
0
,
0
,
0
,
100
,
100
,
NULL
,
NULL
,
GetModuleHandle
A
(
NULL
),
NULL
);
ok
(
hwnd
!=
NULL
,
"Couldn't create window i=%d
\n
"
,
i
);
ok
(
hwnd
!=
NULL
,
"Couldn't create window i=%d
\n
"
,
i
);
ok
(
GetWindowLongPtrA
(
hwnd
,
GWLP_WNDPROC
)
==
(
LONG_PTR
)
pDefWindowProcA
,
"Wrong ANSI wndproc: %p vs %p
\n
"
,
ok
(
GetWindowLongPtrA
(
hwnd
,
GWLP_WNDPROC
)
==
(
LONG_PTR
)
pDefWindowProcA
,
"Wrong ANSI wndproc: %p vs %p
\n
"
,
...
@@ -674,21 +674,21 @@ static void test_builtinproc(void)
...
@@ -674,21 +674,21 @@ static void test_builtinproc(void)
(
void
*
)
GetClassLongPtrW
(
hwnd
,
GCLP_WNDPROC
),
pDefWindowProcW
);
(
void
*
)
GetClassLongPtrW
(
hwnd
,
GCLP_WNDPROC
),
pDefWindowProcW
);
DestroyWindow
(
hwnd
);
DestroyWindow
(
hwnd
);
UnregisterClass
((
LPSTR
)(
DWORD_PTR
)
atom
,
GetModuleHandle
(
NULL
));
UnregisterClass
A
((
LPSTR
)(
DWORD_PTR
)
atom
,
GetModuleHandleA
(
NULL
));
}
}
}
}
/* built-in winproc - window A/W type automatically detected */
/* built-in winproc - window A/W type automatically detected */
ZeroMemory
(
&
cls
,
sizeof
(
cls
));
ZeroMemory
(
&
cls
,
sizeof
(
cls
));
cls
.
cbSize
=
sizeof
(
cls
);
cls
.
cbSize
=
sizeof
(
cls
);
cls
.
hInstance
=
GetModuleHandle
(
NULL
);
cls
.
hInstance
=
GetModuleHandle
A
(
NULL
);
cls
.
hbrBackground
=
GetStockObject
(
WHITE_BRUSH
);
cls
.
hbrBackground
=
GetStockObject
(
WHITE_BRUSH
);
cls
.
lpszClassName
=
classA
;
cls
.
lpszClassName
=
classA
;
cls
.
lpfnWndProc
=
pDefWindowProcW
;
cls
.
lpfnWndProc
=
pDefWindowProcW
;
atom
=
RegisterClassExA
(
&
cls
);
atom
=
RegisterClassExA
(
&
cls
);
hwnd
=
CreateWindowExW
(
0
,
classW
,
NULL
,
WS_OVERLAPPEDWINDOW
,
hwnd
=
CreateWindowExW
(
0
,
classW
,
NULL
,
WS_OVERLAPPEDWINDOW
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
680
,
260
,
NULL
,
NULL
,
GetModuleHandle
A
(
NULL
),
0
);
CW_USEDEFAULT
,
CW_USEDEFAULT
,
680
,
260
,
NULL
,
NULL
,
GetModuleHandle
W
(
NULL
),
0
);
ok
(
IsWindowUnicode
(
hwnd
),
"Windows should be Unicode
\n
"
);
ok
(
IsWindowUnicode
(
hwnd
),
"Windows should be Unicode
\n
"
);
SetWindowLongPtrW
(
hwnd
,
GWLP_WNDPROC
,
(
LONG_PTR
)
pDefWindowProcA
);
SetWindowLongPtrW
(
hwnd
,
GWLP_WNDPROC
,
(
LONG_PTR
)
pDefWindowProcA
);
ok
(
IsWindowUnicode
(
hwnd
),
"Windows should have remained Unicode
\n
"
);
ok
(
IsWindowUnicode
(
hwnd
),
"Windows should have remained Unicode
\n
"
);
...
@@ -706,12 +706,12 @@ static void test_builtinproc(void)
...
@@ -706,12 +706,12 @@ static void test_builtinproc(void)
ok
(
IsWindowUnicode
(
hwnd
)
==
FALSE
,
"SetWindowLongPtrA should have switched window to ANSI
\n
"
);
ok
(
IsWindowUnicode
(
hwnd
)
==
FALSE
,
"SetWindowLongPtrA should have switched window to ANSI
\n
"
);
DestroyWindow
(
hwnd
);
DestroyWindow
(
hwnd
);
UnregisterClass
((
LPSTR
)(
DWORD_PTR
)
atom
,
GetModuleHandle
(
NULL
));
UnregisterClass
A
((
LPSTR
)(
DWORD_PTR
)
atom
,
GetModuleHandleA
(
NULL
));
/* custom winproc - the same function can be used as both A and W*/
/* custom winproc - the same function can be used as both A and W*/
ZeroMemory
(
&
cls
,
sizeof
(
cls
));
ZeroMemory
(
&
cls
,
sizeof
(
cls
));
cls
.
cbSize
=
sizeof
(
cls
);
cls
.
cbSize
=
sizeof
(
cls
);
cls
.
hInstance
=
GetModuleHandle
(
NULL
);
cls
.
hInstance
=
GetModuleHandle
A
(
NULL
);
cls
.
hbrBackground
=
GetStockObject
(
WHITE_BRUSH
);
cls
.
hbrBackground
=
GetStockObject
(
WHITE_BRUSH
);
cls
.
lpszClassName
=
classA
;
cls
.
lpszClassName
=
classA
;
cls
.
lpfnWndProc
=
ClassTest_WndProc2
;
cls
.
lpfnWndProc
=
ClassTest_WndProc2
;
...
@@ -726,7 +726,7 @@ static void test_builtinproc(void)
...
@@ -726,7 +726,7 @@ static void test_builtinproc(void)
ok
(
IsWindowUnicode
(
hwnd
)
==
FALSE
,
"SetWindowLongPtrA should have changed window to ANSI
\n
"
);
ok
(
IsWindowUnicode
(
hwnd
)
==
FALSE
,
"SetWindowLongPtrA should have changed window to ANSI
\n
"
);
DestroyWindow
(
hwnd
);
DestroyWindow
(
hwnd
);
UnregisterClass
((
LPSTR
)(
DWORD_PTR
)
atom
,
GetModuleHandle
(
NULL
));
UnregisterClass
A
((
LPSTR
)(
DWORD_PTR
)
atom
,
GetModuleHandleA
(
NULL
));
/* For most of the builtin controls both GetWindowLongPtrA and W returns a pointer that is executed directly
/* For most of the builtin controls both GetWindowLongPtrA and W returns a pointer that is executed directly
* by CallWindowProcA/W */
* by CallWindowProcA/W */
...
@@ -736,7 +736,7 @@ static void test_builtinproc(void)
...
@@ -736,7 +736,7 @@ static void test_builtinproc(void)
hwnd
=
CreateWindowExA
(
0
,
NORMAL_CLASSES
[
i
],
classA
,
WS_OVERLAPPEDWINDOW
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
680
,
260
,
hwnd
=
CreateWindowExA
(
0
,
NORMAL_CLASSES
[
i
],
classA
,
WS_OVERLAPPEDWINDOW
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
680
,
260
,
NULL
,
NULL
,
NULL
,
0
);
NULL
,
NULL
,
NULL
,
0
);
ok
(
hwnd
!=
NULL
,
"Couldn't create window of class %s
\n
"
,
NORMAL_CLASSES
[
i
]);
ok
(
hwnd
!=
NULL
,
"Couldn't create window of class %s
\n
"
,
NORMAL_CLASSES
[
i
]);
SetWindowText
(
hwnd
,
classA
);
/* ComboBox needs this */
SetWindowText
A
(
hwnd
,
classA
);
/* ComboBox needs this */
procA
=
(
WNDPROC
)
GetWindowLongPtrA
(
hwnd
,
GWLP_WNDPROC
);
procA
=
(
WNDPROC
)
GetWindowLongPtrA
(
hwnd
,
GWLP_WNDPROC
);
procW
=
(
WNDPROC
)
GetWindowLongPtrW
(
hwnd
,
GWLP_WNDPROC
);
procW
=
(
WNDPROC
)
GetWindowLongPtrW
(
hwnd
,
GWLP_WNDPROC
);
ok
(
!
IS_WNDPROC_HANDLE
(
procA
),
"procA should not be a handle for %s (%p)
\n
"
,
NORMAL_CLASSES
[
i
],
procA
);
ok
(
!
IS_WNDPROC_HANDLE
(
procA
),
"procA should not be a handle for %s (%p)
\n
"
,
NORMAL_CLASSES
[
i
],
procA
);
...
@@ -837,30 +837,30 @@ static void test_builtinproc(void)
...
@@ -837,30 +837,30 @@ static void test_builtinproc(void)
static
LRESULT
WINAPI
TestDlgProc
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
LRESULT
WINAPI
TestDlgProc
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
{
return
DefWindowProc
(
hWnd
,
uMsg
,
wParam
,
lParam
);
return
DefWindowProc
A
(
hWnd
,
uMsg
,
wParam
,
lParam
);
}
}
static
BOOL
RegisterTestDialog
(
HINSTANCE
hInstance
)
static
BOOL
RegisterTestDialog
(
HINSTANCE
hInstance
)
{
{
WNDCLASSEX
wcx
;
WNDCLASSEX
A
wcx
;
ATOM
atom
=
0
;
ATOM
atom
=
0
;
ZeroMemory
(
&
wcx
,
sizeof
(
WNDCLASSEX
));
ZeroMemory
(
&
wcx
,
sizeof
(
WNDCLASSEX
A
));
wcx
.
cbSize
=
sizeof
(
wcx
);
wcx
.
cbSize
=
sizeof
(
wcx
);
wcx
.
lpfnWndProc
=
TestDlgProc
;
wcx
.
lpfnWndProc
=
TestDlgProc
;
wcx
.
cbClsExtra
=
0
;
wcx
.
cbClsExtra
=
0
;
wcx
.
cbWndExtra
=
DLGWINDOWEXTRA
;
wcx
.
cbWndExtra
=
DLGWINDOWEXTRA
;
wcx
.
hInstance
=
hInstance
;
wcx
.
hInstance
=
hInstance
;
wcx
.
hIcon
=
LoadIcon
(
NULL
,
IDI_APPLICATION
);
wcx
.
hIcon
=
LoadIcon
A
(
NULL
,
(
LPCSTR
)
IDI_APPLICATION
);
wcx
.
hCursor
=
LoadCursor
(
NULL
,
IDC_ARROW
);
wcx
.
hCursor
=
LoadCursor
A
(
NULL
,
(
LPCSTR
)
IDC_ARROW
);
wcx
.
hbrBackground
=
GetStockObject
(
WHITE_BRUSH
);
wcx
.
hbrBackground
=
GetStockObject
(
WHITE_BRUSH
);
wcx
.
lpszClassName
=
"TestDialog"
;
wcx
.
lpszClassName
=
"TestDialog"
;
wcx
.
lpszMenuName
=
"TestDialog"
;
wcx
.
lpszMenuName
=
"TestDialog"
;
wcx
.
hIconSm
=
LoadImage
(
hInstance
,
MAKEINTRESOURCE
(
5
),
IMAGE_ICON
,
wcx
.
hIconSm
=
LoadImage
A
(
hInstance
,
(
LPCSTR
)
MAKEINTRESOURCE
(
5
),
IMAGE_ICON
,
GetSystemMetrics
(
SM_CXSMICON
),
GetSystemMetrics
(
SM_CYSMICON
),
GetSystemMetrics
(
SM_CXSMICON
),
GetSystemMetrics
(
SM_CYSMICON
),
LR_DEFAULTCOLOR
);
LR_DEFAULTCOLOR
);
atom
=
RegisterClassEx
(
&
wcx
);
atom
=
RegisterClassEx
A
(
&
wcx
);
ok
(
atom
!=
0
,
"RegisterClassEx returned 0
\n
"
);
ok
(
atom
!=
0
,
"RegisterClassEx returned 0
\n
"
);
return
atom
;
return
atom
;
...
@@ -874,7 +874,7 @@ static void CreateDialogParamTest(HINSTANCE hInstance)
...
@@ -874,7 +874,7 @@ static void CreateDialogParamTest(HINSTANCE hInstance)
if
(
RegisterTestDialog
(
hInstance
))
if
(
RegisterTestDialog
(
hInstance
))
{
{
hWndMain
=
CreateDialogParam
(
hInstance
,
"CLASS_TEST_DIALOG"
,
NULL
,
0
,
0
);
hWndMain
=
CreateDialogParam
A
(
hInstance
,
"CLASS_TEST_DIALOG"
,
NULL
,
0
,
0
);
ok
(
hWndMain
!=
NULL
,
"CreateDialogParam returned NULL
\n
"
);
ok
(
hWndMain
!=
NULL
,
"CreateDialogParam returned NULL
\n
"
);
ShowWindow
(
hWndMain
,
SW_SHOW
);
ShowWindow
(
hWndMain
,
SW_SHOW
);
DestroyWindow
(
hWndMain
);
DestroyWindow
(
hWndMain
);
...
@@ -901,8 +901,8 @@ static void test_extra_values(void)
...
@@ -901,8 +901,8 @@ static void test_extra_values(void)
int
i
;
int
i
;
for
(
i
=
0
;
i
<
sizeof
(
extra_values
)
/
sizeof
(
extra_values
[
0
]);
i
++
)
for
(
i
=
0
;
i
<
sizeof
(
extra_values
)
/
sizeof
(
extra_values
[
0
]);
i
++
)
{
{
WNDCLASSEX
wcx
;
WNDCLASSEX
A
wcx
;
BOOL
ret
=
GetClassInfoEx
(
NULL
,
extra_values
[
i
].
name
,
&
wcx
);
BOOL
ret
=
GetClassInfoEx
A
(
NULL
,
extra_values
[
i
].
name
,
&
wcx
);
ok
(
ret
,
"GetClassInfo (0) failed for global class %s
\n
"
,
extra_values
[
i
].
name
);
ok
(
ret
,
"GetClassInfo (0) failed for global class %s
\n
"
,
extra_values
[
i
].
name
);
if
(
!
ret
)
continue
;
if
(
!
ret
)
continue
;
...
...
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