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
2f77e2b9
Commit
2f77e2b9
authored
Jun 20, 2010
by
Florian Köberle
Committed by
Alexandre Julliard
Jun 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Test calculating the rect of a child item while handling TVN_ITEMEXPANDED.
parent
2c354b8b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
treeview.c
dlls/comctl32/tests/treeview.c
+26
-0
No files found.
dlls/comctl32/tests/treeview.c
View file @
2f77e2b9
...
...
@@ -819,12 +819,15 @@ static void test_get_set_unicodeformat(void)
static
TVITEMA
g_item_expanding
,
g_item_expanded
;
static
BOOL
g_get_from_expand
;
static
BOOL
g_get_rect_in_expand
;
static
LRESULT
CALLBACK
parent_wnd_proc
(
HWND
hWnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
static
LONG
defwndproc_counter
=
0
;
struct
message
msg
;
LRESULT
ret
;
RECT
rect
;
HTREEITEM
visibleItem
;
msg
.
message
=
message
;
msg
.
flags
=
sent
|
wparam
|
lparam
;
...
...
@@ -907,6 +910,17 @@ static LRESULT CALLBACK parent_wnd_proc(HWND hWnd, UINT message, WPARAM wParam,
ret
=
SendMessageA
(
pHdr
->
hwndFrom
,
TVM_GETITEMA
,
0
,
(
LPARAM
)
&
g_item_expanded
);
ok
(
ret
==
TRUE
,
"got %lu
\n
"
,
ret
);
}
if
(
g_get_rect_in_expand
)
{
visibleItem
=
TreeView_GetNextItem
(
pHdr
->
hwndFrom
,
NULL
,
TVGN_FIRSTVISIBLE
);
ok
(
pTreeView
->
itemNew
.
hItem
==
visibleItem
,
"expanded item == first visible item
\n
"
);
*
(
HTREEITEM
*
)
&
rect
=
visibleItem
;
ok
(
SendMessage
(
pHdr
->
hwndFrom
,
TVM_GETITEMRECT
,
TRUE
,
(
LPARAM
)
&
rect
),
"Failed to get rect for first visible item.
\n
"
);
visibleItem
=
TreeView_GetNextItem
(
pHdr
->
hwndFrom
,
visibleItem
,
TVGN_NEXTVISIBLE
);
*
(
HTREEITEM
*
)
&
rect
=
visibleItem
;
ok
(
visibleItem
!=
NULL
,
"There must be a visible item after the first visisble item.
\n
"
);
todo_wine
ok
(
SendMessage
(
pHdr
->
hwndFrom
,
TVM_GETITEMRECT
,
TRUE
,
(
LPARAM
)
&
rect
),
"Failed to get rect for second visible item.
\n
"
);
}
break
;
}
}
...
...
@@ -1167,6 +1181,17 @@ static void test_expandnotify(void)
DestroyWindow
(
hTree
);
}
static
void
test_rect_retrieval_after_expand_with_select
(
void
)
{
BOOL
ret
;
HWND
hTree
;
hTree
=
create_treeview_control
();
fill_tree
(
hTree
);
g_get_rect_in_expand
=
TRUE
;
ret
=
TreeView_Select
(
hTree
,
hChild
,
TVGN_CARET
);
g_get_rect_in_expand
=
FALSE
;
ok
(
ret
,
"TreeView_Select should return true
\n
"
);
}
START_TEST
(
treeview
)
{
HMODULE
hComctl32
;
...
...
@@ -1227,6 +1252,7 @@ START_TEST(treeview)
test_itemedit
();
test_treeview_classinfo
();
test_expandnotify
();
test_rect_retrieval_after_expand_with_select
();
PostMessageA
(
hMainWnd
,
WM_CLOSE
,
0
,
0
);
while
(
GetMessageA
(
&
msg
,
0
,
0
,
0
))
{
...
...
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