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
48d42d4a
Commit
48d42d4a
authored
Dec 22, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 22, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Some tests for buddy procedure subclassing.
parent
8fc96f20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
1 deletion
+38
-1
updown.c
dlls/comctl32/tests/updown.c
+38
-1
No files found.
dlls/comctl32/tests/updown.c
View file @
48d42d4a
...
...
@@ -61,6 +61,8 @@
static
HWND
parent_wnd
,
g_edit
;
static
BOOL
(
WINAPI
*
pSetWindowSubclass
)(
HWND
,
SUBCLASSPROC
,
UINT_PTR
,
DWORD_PTR
);
static
struct
msg_sequence
*
sequences
[
NUM_MSG_SEQUENCES
];
static
const
struct
message
add_updown_with_edit_seq
[]
=
{
...
...
@@ -436,7 +438,9 @@ static void test_updown_pos32(void)
static
void
test_updown_buddy
(
void
)
{
HWND
updown
,
buddyReturn
;
HWND
updown
,
buddyReturn
,
buddy
;
WNDPROC
proc
;
DWORD
style
;
updown
=
create_updown_control
(
UDS_ALIGNRIGHT
,
g_edit
);
...
...
@@ -455,6 +459,35 @@ static void test_updown_buddy(void)
ok_sequence
(
sequences
,
EDIT_SEQ_INDEX
,
add_updown_with_edit_seq
,
"test updown buddy_edit"
,
FALSE
);
DestroyWindow
(
updown
);
buddy
=
create_edit_control
();
proc
=
(
WNDPROC
)
GetWindowLongPtrA
(
buddy
,
GWLP_WNDPROC
);
updown
=
create_updown_control
(
UDS_ALIGNRIGHT
,
buddy
);
ok
(
proc
==
(
WNDPROC
)
GetWindowLongPtrA
(
buddy
,
GWLP_WNDPROC
),
"No subclassing expected
\n
"
);
style
=
GetWindowLongA
(
updown
,
GWL_STYLE
);
SetWindowLongA
(
updown
,
GWL_STYLE
,
style
|
UDS_ARROWKEYS
);
style
=
GetWindowLongA
(
updown
,
GWL_STYLE
);
ok
(
style
&
UDS_ARROWKEYS
,
"Expected UDS_ARROWKEYS
\n
"
);
/* no subclass if UDS_ARROWKEYS set after creation */
ok
(
proc
==
(
WNDPROC
)
GetWindowLongPtrA
(
buddy
,
GWLP_WNDPROC
),
"No subclassing expected
\n
"
);
DestroyWindow
(
updown
);
updown
=
create_updown_control
(
UDS_ALIGNRIGHT
|
UDS_ARROWKEYS
,
buddy
);
ok
(
proc
!=
(
WNDPROC
)
GetWindowLongPtrA
(
buddy
,
GWLP_WNDPROC
),
"Subclassing expected
\n
"
);
if
(
pSetWindowSubclass
)
{
/* updown uses subclass helpers for buddy on >5.8x systems */
todo_wine
ok
(
GetPropA
(
buddy
,
"CC32SubclassInfo"
)
!=
NULL
,
"Expected CC32SubclassInfo property
\n
"
);
}
DestroyWindow
(
updown
);
DestroyWindow
(
buddy
);
}
static
void
test_updown_base
(
void
)
...
...
@@ -687,6 +720,10 @@ static void test_UDS_SETBUDDYINT(void)
START_TEST
(
updown
)
{
HMODULE
mod
=
GetModuleHandleA
(
"comctl32.dll"
);
pSetWindowSubclass
=
(
void
*
)
GetProcAddress
(
mod
,
(
LPSTR
)
410
);
InitCommonControls
();
init_msg_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
...
...
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