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
3d421a47
Commit
3d421a47
authored
Feb 14, 2008
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 15, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Use custom window procs instead of DefWindowProcA/W in the IsWindowUnicode test.
parent
971c4e19
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
15 deletions
+25
-15
win.c
dlls/user32/tests/win.c
+25
-15
No files found.
dlls/user32/tests/win.c
View file @
3d421a47
...
...
@@ -3597,6 +3597,16 @@ static void test_csparentdc(void)
DestroyWindow
(
hwnd2
);
}
static
LRESULT
WINAPI
def_window_procA
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
return
DefWindowProcA
(
hwnd
,
msg
,
wparam
,
lparam
);
}
static
LRESULT
WINAPI
def_window_procW
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
return
DefWindowProcW
(
hwnd
,
msg
,
wparam
,
lparam
);
}
static
void
test_IsWindowUnicode
(
void
)
{
static
const
char
ansi_class_nameA
[]
=
"ansi class name"
;
...
...
@@ -3609,13 +3619,13 @@ static void test_IsWindowUnicode(void)
memset
(
&
classW
,
0
,
sizeof
(
classW
));
classW
.
hInstance
=
GetModuleHandleA
(
0
);
classW
.
lpfnWndProc
=
DefWindowP
rocW
;
classW
.
lpfnWndProc
=
def_window_p
rocW
;
classW
.
lpszClassName
=
unicode_class_nameW
;
if
(
!
RegisterClassW
(
&
classW
))
return
;
if
(
!
RegisterClassW
(
&
classW
))
return
;
/* this catches Win9x as well */
memset
(
&
classA
,
0
,
sizeof
(
classA
));
classA
.
hInstance
=
GetModuleHandleA
(
0
);
classA
.
lpfnWndProc
=
DefWindowP
rocA
;
classA
.
lpfnWndProc
=
def_window_p
rocA
;
classA
.
lpszClassName
=
ansi_class_nameA
;
assert
(
RegisterClassA
(
&
classA
));
...
...
@@ -3625,9 +3635,9 @@ static void test_IsWindowUnicode(void)
assert
(
hwnd
);
ok
(
IsWindowUnicode
(
hwnd
),
"IsWindowUnicode expected to return TRUE
\n
"
);
SetWindowLongPtrA
(
hwnd
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
DefWindowP
rocA
);
SetWindowLongPtrA
(
hwnd
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
def_window_p
rocA
);
ok
(
!
IsWindowUnicode
(
hwnd
),
"IsWindowUnicode expected to return FALSE
\n
"
);
SetWindowLongPtrW
(
hwnd
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
DefWindowP
rocW
);
SetWindowLongPtrW
(
hwnd
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
def_window_p
rocW
);
ok
(
IsWindowUnicode
(
hwnd
),
"IsWindowUnicode expected to return TRUE
\n
"
);
DestroyWindow
(
hwnd
);
...
...
@@ -3637,9 +3647,9 @@ static void test_IsWindowUnicode(void)
assert
(
hwnd
);
ok
(
IsWindowUnicode
(
hwnd
),
"IsWindowUnicode expected to return TRUE
\n
"
);
SetWindowLongPtrA
(
hwnd
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
DefWindowP
rocA
);
SetWindowLongPtrA
(
hwnd
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
def_window_p
rocA
);
ok
(
!
IsWindowUnicode
(
hwnd
),
"IsWindowUnicode expected to return FALSE
\n
"
);
SetWindowLongPtrW
(
hwnd
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
DefWindowP
rocW
);
SetWindowLongPtrW
(
hwnd
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
def_window_p
rocW
);
ok
(
IsWindowUnicode
(
hwnd
),
"IsWindowUnicode expected to return TRUE
\n
"
);
DestroyWindow
(
hwnd
);
...
...
@@ -3650,9 +3660,9 @@ static void test_IsWindowUnicode(void)
assert
(
hwnd
);
ok
(
!
IsWindowUnicode
(
hwnd
),
"IsWindowUnicode expected to return FALSE
\n
"
);
SetWindowLongPtrW
(
hwnd
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
DefWindowP
rocW
);
SetWindowLongPtrW
(
hwnd
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
def_window_p
rocW
);
ok
(
IsWindowUnicode
(
hwnd
),
"IsWindowUnicode expected to return TRUE
\n
"
);
SetWindowLongPtrA
(
hwnd
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
DefWindowP
rocA
);
SetWindowLongPtrA
(
hwnd
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
def_window_p
rocA
);
ok
(
!
IsWindowUnicode
(
hwnd
),
"IsWindowUnicode expected to return FALSE
\n
"
);
DestroyWindow
(
hwnd
);
...
...
@@ -3662,9 +3672,9 @@ static void test_IsWindowUnicode(void)
assert
(
hwnd
);
ok
(
!
IsWindowUnicode
(
hwnd
),
"IsWindowUnicode expected to return FALSE
\n
"
);
SetWindowLongPtrW
(
hwnd
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
DefWindowP
rocW
);
SetWindowLongPtrW
(
hwnd
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
def_window_p
rocW
);
ok
(
IsWindowUnicode
(
hwnd
),
"IsWindowUnicode expected to return TRUE
\n
"
);
SetWindowLongPtrA
(
hwnd
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
DefWindowP
rocA
);
SetWindowLongPtrA
(
hwnd
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
def_window_p
rocA
);
ok
(
!
IsWindowUnicode
(
hwnd
),
"IsWindowUnicode expected to return FALSE
\n
"
);
DestroyWindow
(
hwnd
);
...
...
@@ -3675,7 +3685,7 @@ static void test_IsWindowUnicode(void)
assert
(
hwnd
);
ok
(
IsWindowUnicode
(
hwnd
),
"IsWindowUnicode expected to return TRUE
\n
"
);
SetClassLongPtrA
(
hwnd
,
GCLP_WNDPROC
,
(
ULONG_PTR
)
DefWindowP
rocA
);
SetClassLongPtrA
(
hwnd
,
GCLP_WNDPROC
,
(
ULONG_PTR
)
def_window_p
rocA
);
ok
(
IsWindowUnicode
(
hwnd
),
"IsWindowUnicode expected to return TRUE
\n
"
);
/* do not restore class window proc back to unicode */
...
...
@@ -3686,7 +3696,7 @@ static void test_IsWindowUnicode(void)
assert
(
hwnd
);
ok
(
!
IsWindowUnicode
(
hwnd
),
"IsWindowUnicode expected to return FALSE
\n
"
);
SetClassLongPtrW
(
hwnd
,
GCLP_WNDPROC
,
(
ULONG_PTR
)
DefWindowP
rocW
);
SetClassLongPtrW
(
hwnd
,
GCLP_WNDPROC
,
(
ULONG_PTR
)
def_window_p
rocW
);
ok
(
!
IsWindowUnicode
(
hwnd
),
"IsWindowUnicode expected to return FALSE
\n
"
);
DestroyWindow
(
hwnd
);
...
...
@@ -3697,7 +3707,7 @@ static void test_IsWindowUnicode(void)
assert
(
hwnd
);
ok
(
!
IsWindowUnicode
(
hwnd
),
"IsWindowUnicode expected to return FALSE
\n
"
);
SetClassLongPtrW
(
hwnd
,
GCLP_WNDPROC
,
(
ULONG_PTR
)
DefWindowP
rocW
);
SetClassLongPtrW
(
hwnd
,
GCLP_WNDPROC
,
(
ULONG_PTR
)
def_window_p
rocW
);
ok
(
!
IsWindowUnicode
(
hwnd
),
"IsWindowUnicode expected to return FALSE
\n
"
);
/* do not restore class window proc back to ansi */
...
...
@@ -3708,7 +3718,7 @@ static void test_IsWindowUnicode(void)
assert
(
hwnd
);
ok
(
IsWindowUnicode
(
hwnd
),
"IsWindowUnicode expected to return TRUE
\n
"
);
SetClassLongPtrA
(
hwnd
,
GCLP_WNDPROC
,
(
ULONG_PTR
)
DefWindowP
rocA
);
SetClassLongPtrA
(
hwnd
,
GCLP_WNDPROC
,
(
ULONG_PTR
)
def_window_p
rocA
);
ok
(
IsWindowUnicode
(
hwnd
),
"IsWindowUnicode expected to return TRUE
\n
"
);
DestroyWindow
(
hwnd
);
...
...
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