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
fc655397
Commit
fc655397
authored
Aug 12, 2008
by
Lei Zhang
Committed by
Alexandre Julliard
Aug 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Add a test for TTM_GETTEXT.
parent
accb5f8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
0 deletions
+60
-0
tooltips.c
dlls/comctl32/tests/tooltips.c
+60
-0
No files found.
dlls/comctl32/tests/tooltips.c
View file @
fc655397
...
...
@@ -232,10 +232,70 @@ static void test_customdraw(void) {
}
static
void
test_gettext
(
void
)
{
HWND
hwnd
;
TTTOOLINFOA
toolinfoA
;
TTTOOLINFOW
toolinfoW
;
LRESULT
r
;
char
bufA
[
10
]
=
""
;
WCHAR
bufW
[
10
]
=
{
0
};
/* For bug 14790 - lpszText is NULL */
hwnd
=
CreateWindowExA
(
0
,
TOOLTIPS_CLASSA
,
NULL
,
0
,
10
,
10
,
300
,
100
,
NULL
,
NULL
,
NULL
,
0
);
assert
(
hwnd
);
toolinfoA
.
cbSize
=
sizeof
(
TTTOOLINFOA
);
toolinfoA
.
hwnd
=
NULL
;
toolinfoA
.
hinst
=
GetModuleHandleA
(
NULL
);
toolinfoA
.
uFlags
=
0
;
toolinfoA
.
uId
=
(
UINT_PTR
)
0x1234ABCD
;
toolinfoA
.
lpszText
=
NULL
;
toolinfoA
.
lParam
=
0xdeadbeef
;
GetClientRect
(
hwnd
,
&
toolinfoA
.
rect
);
r
=
SendMessageA
(
hwnd
,
TTM_ADDTOOL
,
0
,
(
LPARAM
)
&
toolinfoA
);
ok
(
r
,
"Adding the tool to the tooltip failed
\n
"
);
toolinfoA
.
hwnd
=
NULL
;
toolinfoA
.
uId
=
(
UINT_PTR
)
0x1234ABCD
;
toolinfoA
.
lpszText
=
bufA
;
SendMessageA
(
hwnd
,
TTM_GETTEXTA
,
0
,
(
LPARAM
)
&
toolinfoA
);
ok
(
strcmp
(
toolinfoA
.
lpszText
,
""
)
==
0
,
"lpszText should be an empty string
\n
"
);
DestroyWindow
(
hwnd
);
hwnd
=
CreateWindowExW
(
0
,
TOOLTIPS_CLASSW
,
NULL
,
0
,
10
,
10
,
300
,
100
,
NULL
,
NULL
,
NULL
,
0
);
assert
(
hwnd
);
toolinfoW
.
cbSize
=
sizeof
(
TTTOOLINFOW
);
toolinfoW
.
hwnd
=
NULL
;
toolinfoW
.
hinst
=
GetModuleHandleA
(
NULL
);
toolinfoW
.
uFlags
=
0
;
toolinfoW
.
uId
=
(
UINT_PTR
)
0x1234ABCD
;
toolinfoW
.
lpszText
=
NULL
;
toolinfoW
.
lParam
=
0xdeadbeef
;
GetClientRect
(
hwnd
,
&
toolinfoW
.
rect
);
r
=
SendMessageW
(
hwnd
,
TTM_ADDTOOL
,
0
,
(
LPARAM
)
&
toolinfoW
);
ok
(
r
,
"Adding the tool to the tooltip failed
\n
"
);
toolinfoW
.
hwnd
=
NULL
;
toolinfoW
.
uId
=
(
UINT_PTR
)
0x1234ABCD
;
toolinfoW
.
lpszText
=
bufW
;
SendMessageW
(
hwnd
,
TTM_GETTEXTW
,
0
,
(
LPARAM
)
&
toolinfoW
);
ok
(
toolinfoW
.
lpszText
[
0
]
==
0
,
"lpszText should be an empty string
\n
"
);
DestroyWindow
(
hwnd
);
}
START_TEST
(
tooltips
)
{
InitCommonControls
();
test_create_tooltip
();
test_customdraw
();
test_gettext
();
}
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