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
0e5dac61
Commit
0e5dac61
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: Selected item should have TCIS_BUTTONPRESSED state.
parent
db60f69c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
tab.c
dlls/comctl32/tab.c
+5
-11
tab.c
dlls/comctl32/tests/tab.c
+10
-0
No files found.
dlls/comctl32/tab.c
View file @
0e5dac61
...
...
@@ -252,6 +252,9 @@ static inline LRESULT TAB_SetCurSel (TAB_INFO *infoPtr, INT iItem)
return
-
1
;
else
{
if
(
infoPtr
->
iSelected
!=
iItem
)
{
infoPtr
->
items
[
prevItem
].
dwState
&=
~
TCIS_BUTTONPRESSED
;
infoPtr
->
items
[
iItem
].
dwState
|=
TCIS_BUTTONPRESSED
;
infoPtr
->
iSelected
=
iItem
;
infoPtr
->
uFocus
=
iItem
;
TAB_EnsureSelectionVisible
(
infoPtr
);
...
...
@@ -489,12 +492,8 @@ static LRESULT TAB_KeyUp(TAB_INFO* infoPtr, WPARAM keyCode)
{
if
(
!
TAB_SendSimpleNotify
(
infoPtr
,
TCN_SELCHANGING
))
{
infoPtr
->
iSelected
=
newItem
;
infoPtr
->
uFocus
=
newItem
;
TAB_SetCurSel
(
infoPtr
,
newItem
);
TAB_SendSimpleNotify
(
infoPtr
,
TCN_SELCHANGE
);
TAB_EnsureSelectionVisible
(
infoPtr
);
TAB_InvalidateTabArea
(
infoPtr
);
}
}
...
...
@@ -615,13 +614,8 @@ TAB_LButtonDown (TAB_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
{
if
(
!
TAB_SendSimpleNotify
(
infoPtr
,
TCN_SELCHANGING
))
{
infoPtr
->
iSelected
=
newItem
;
infoPtr
->
uFocus
=
newItem
;
TAB_SetCurSel
(
infoPtr
,
newItem
);
TAB_SendSimpleNotify
(
infoPtr
,
TCN_SELCHANGE
);
TAB_EnsureSelectionVisible
(
infoPtr
);
TAB_InvalidateTabArea
(
infoPtr
);
}
}
return
0
;
...
...
dlls/comctl32/tests/tab.c
View file @
0e5dac61
...
...
@@ -727,6 +727,7 @@ static void test_getters_setters(HWND parent_wnd, INT nTabs)
{
INT
selectionIndex
;
INT
focusIndex
;
TCITEM
tcItem
;
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
...
...
@@ -756,6 +757,15 @@ static void test_getters_setters(HWND parent_wnd, INT nTabs)
ok_sequence
(
sequences
,
TAB_SEQ_INDEX
,
getset_cur_sel_seq
,
"Getset curSel test sequence"
,
FALSE
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
empty_sequence
,
"Getset curSel test parent sequence"
,
FALSE
);
/* selected item should have TCIS_BUTTONPRESSED state
It doesn't depend on button state */
memset
(
&
tcItem
,
0
,
sizeof
(
TCITEM
));
tcItem
.
mask
=
TCIF_STATE
;
tcItem
.
dwStateMask
=
TCIS_BUTTONPRESSED
;
selectionIndex
=
SendMessage
(
hTab
,
TCM_GETCURSEL
,
0
,
0
);
SendMessage
(
hTab
,
TCM_GETITEM
,
selectionIndex
,
(
LPARAM
)
&
tcItem
);
ok
(
tcItem
.
dwState
&
TCIS_BUTTONPRESSED
,
"Selected item should have TCIS_BUTTONPRESSED
\n
"
);
}
/* Testing ExtendedStyle */
...
...
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