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
db60f69c
Commit
db60f69c
authored
Mar 25, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 26, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tab: Handle state mask in TCM_[G,S]ETITEM.
parent
751732e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
2 deletions
+26
-2
tab.c
dlls/comctl32/tab.c
+3
-2
tab.c
dlls/comctl32/tests/tab.c
+23
-0
No files found.
dlls/comctl32/tab.c
View file @
db60f69c
...
@@ -2719,7 +2719,8 @@ TAB_SetItemT (TAB_INFO *infoPtr, INT iItem, LPTCITEMW tabItem, BOOL bUnicode)
...
@@ -2719,7 +2719,8 @@ TAB_SetItemT (TAB_INFO *infoPtr, INT iItem, LPTCITEMW tabItem, BOOL bUnicode)
FIXME
(
"TCIF_RTLREADING
\n
"
);
FIXME
(
"TCIF_RTLREADING
\n
"
);
if
(
tabItem
->
mask
&
TCIF_STATE
)
if
(
tabItem
->
mask
&
TCIF_STATE
)
wineItem
->
dwState
=
tabItem
->
dwState
;
wineItem
->
dwState
=
(
wineItem
->
dwState
&
~
tabItem
->
dwStateMask
)
|
(
tabItem
->
dwState
&
tabItem
->
dwStateMask
);
if
(
tabItem
->
mask
&
TCIF_TEXT
)
if
(
tabItem
->
mask
&
TCIF_TEXT
)
{
{
...
@@ -2766,7 +2767,7 @@ TAB_GetItemT (TAB_INFO *infoPtr, INT iItem, LPTCITEMW tabItem, BOOL bUnicode)
...
@@ -2766,7 +2767,7 @@ TAB_GetItemT (TAB_INFO *infoPtr, INT iItem, LPTCITEMW tabItem, BOOL bUnicode)
FIXME
(
"TCIF_RTLREADING
\n
"
);
FIXME
(
"TCIF_RTLREADING
\n
"
);
if
(
tabItem
->
mask
&
TCIF_STATE
)
if
(
tabItem
->
mask
&
TCIF_STATE
)
tabItem
->
dwState
=
wineItem
->
dwState
;
tabItem
->
dwState
=
wineItem
->
dwState
&
tabItem
->
dwStateMask
;
if
(
tabItem
->
mask
&
TCIF_TEXT
)
if
(
tabItem
->
mask
&
TCIF_TEXT
)
{
{
...
...
dlls/comctl32/tests/tab.c
View file @
db60f69c
...
@@ -831,6 +831,29 @@ static void test_getters_setters(HWND parent_wnd, INT nTabs)
...
@@ -831,6 +831,29 @@ static void test_getters_setters(HWND parent_wnd, INT nTabs)
ok_sequence
(
sequences
,
TAB_SEQ_INDEX
,
getset_item_seq
,
"Getset item test sequence"
,
FALSE
);
ok_sequence
(
sequences
,
TAB_SEQ_INDEX
,
getset_item_seq
,
"Getset item test sequence"
,
FALSE
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
empty_sequence
,
"Getset item test parent sequence"
,
FALSE
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
empty_sequence
,
"Getset item test parent sequence"
,
FALSE
);
/* TCIS_BUTTONPRESSED doesn't depend on tab style */
memset
(
&
tcItem
,
0
,
sizeof
(
tcItem
));
tcItem
.
mask
=
TCIF_STATE
;
tcItem
.
dwStateMask
=
TCIS_BUTTONPRESSED
;
tcItem
.
dwState
=
TCIS_BUTTONPRESSED
;
ok
(
SendMessage
(
hTab
,
TCM_SETITEM
,
0
,
(
LPARAM
)
&
tcItem
),
"Setting new item failed.
\n
"
);
tcItem
.
dwState
=
0
;
ok
(
SendMessage
(
hTab
,
TCM_GETITEM
,
0
,
(
LPARAM
)
&
tcItem
),
"Getting item failed.
\n
"
);
ok
(
tcItem
.
dwState
==
TCIS_BUTTONPRESSED
,
"TCIS_BUTTONPRESSED should be set.
\n
"
);
/* next highlight item, test that dwStateMask actually masks */
tcItem
.
mask
=
TCIF_STATE
;
tcItem
.
dwStateMask
=
TCIS_HIGHLIGHTED
;
tcItem
.
dwState
=
TCIS_HIGHLIGHTED
;
ok
(
SendMessage
(
hTab
,
TCM_SETITEM
,
0
,
(
LPARAM
)
&
tcItem
),
"Setting new item failed.
\n
"
);
tcItem
.
dwState
=
0
;
ok
(
SendMessage
(
hTab
,
TCM_GETITEM
,
0
,
(
LPARAM
)
&
tcItem
),
"Getting item failed.
\n
"
);
ok
(
tcItem
.
dwState
==
TCIS_HIGHLIGHTED
,
"TCIS_HIGHLIGHTED should be set.
\n
"
);
tcItem
.
mask
=
TCIF_STATE
;
tcItem
.
dwStateMask
=
TCIS_BUTTONPRESSED
;
tcItem
.
dwState
=
0
;
ok
(
SendMessage
(
hTab
,
TCM_GETITEM
,
0
,
(
LPARAM
)
&
tcItem
),
"Getting item failed.
\n
"
);
ok
(
tcItem
.
dwState
==
TCIS_BUTTONPRESSED
,
"TCIS_BUTTONPRESSED should be set.
\n
"
);
}
}
/* Testing GetSet ToolTip */
/* Testing GetSet ToolTip */
...
...
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