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
1b2f7517
Commit
1b2f7517
authored
Sep 28, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tab: Add a test for TCM_SETITEMEXTRA.
parent
70843e4f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
8 deletions
+39
-8
tab.c
dlls/comctl32/tab.c
+1
-8
tab.c
dlls/comctl32/tests/tab.c
+38
-0
No files found.
dlls/comctl32/tab.c
View file @
1b2f7517
...
@@ -3190,15 +3190,8 @@ TAB_SetItemExtra (TAB_INFO *infoPtr, INT cbInfo)
...
@@ -3190,15 +3190,8 @@ TAB_SetItemExtra (TAB_INFO *infoPtr, INT cbInfo)
{
{
TRACE
(
"(%p %d)
\n
"
,
infoPtr
,
cbInfo
);
TRACE
(
"(%p %d)
\n
"
,
infoPtr
,
cbInfo
);
if
(
cbInfo
<=
0
)
if
(
cbInfo
<
0
||
infoPtr
->
uNumItem
)
return
FALSE
;
return
FALSE
;
if
(
infoPtr
->
uNumItem
)
{
/* FIXME: MSDN says this is not allowed, but this hasn't been verified */
return
FALSE
;
}
infoPtr
->
cbInfo
=
cbInfo
;
infoPtr
->
cbInfo
=
cbInfo
;
return
TRUE
;
return
TRUE
;
}
}
...
...
dlls/comctl32/tests/tab.c
View file @
1b2f7517
...
@@ -1196,6 +1196,43 @@ static void test_delete_selection(HWND parent_wnd)
...
@@ -1196,6 +1196,43 @@ static void test_delete_selection(HWND parent_wnd)
DestroyWindow
(
hTab
);
DestroyWindow
(
hTab
);
}
}
static
void
test_TCM_SETITEMEXTRA
(
HWND
parent_wnd
)
{
HWND
hTab
;
DWORD
ret
;
hTab
=
CreateWindowA
(
WC_TABCONTROLA
,
"TestTab"
,
WS_CLIPSIBLINGS
|
WS_CLIPCHILDREN
|
TCS_FOCUSNEVER
|
TCS_FIXEDWIDTH
,
10
,
10
,
300
,
100
,
parent_wnd
,
NULL
,
NULL
,
0
);
/* zero is valid size too */
ret
=
SendMessageA
(
hTab
,
TCM_SETITEMEXTRA
,
0
,
0
);
if
(
ret
==
FALSE
)
{
win_skip
(
"TCM_SETITEMEXTRA not supported
\n
"
);
DestroyWindow
(
hTab
);
return
;
}
ret
=
SendMessageA
(
hTab
,
TCM_SETITEMEXTRA
,
-
1
,
0
);
ok
(
ret
==
FALSE
,
"got %d
\n
"
,
ret
);
ret
=
SendMessageA
(
hTab
,
TCM_SETITEMEXTRA
,
2
,
0
);
ok
(
ret
==
TRUE
,
"got %d
\n
"
,
ret
);
DestroyWindow
(
hTab
);
/* it's not possible to change extra data size for control with tabs */
hTab
=
createFilledTabControl
(
parent_wnd
,
TCS_FIXEDWIDTH
,
TCIF_TEXT
|
TCIF_IMAGE
,
4
);
ok
(
hTab
!=
NULL
,
"Failed to create tab control
\n
"
);
ret
=
SendMessageA
(
hTab
,
TCM_SETITEMEXTRA
,
2
,
0
);
ok
(
ret
==
FALSE
,
"got %d
\n
"
,
ret
);
DestroyWindow
(
hTab
);
}
START_TEST
(
tab
)
START_TEST
(
tab
)
{
{
HWND
parent_wnd
;
HWND
parent_wnd
;
...
@@ -1240,6 +1277,7 @@ START_TEST(tab)
...
@@ -1240,6 +1277,7 @@ START_TEST(tab)
test_delete_focus
(
parent_wnd
);
test_delete_focus
(
parent_wnd
);
test_delete_selection
(
parent_wnd
);
test_delete_selection
(
parent_wnd
);
test_removeimage
(
parent_wnd
);
test_removeimage
(
parent_wnd
);
test_TCM_SETITEMEXTRA
(
parent_wnd
);
DestroyWindow
(
parent_wnd
);
DestroyWindow
(
parent_wnd
);
}
}
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