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
3228b4d1
Commit
3228b4d1
authored
Sep 27, 2011
by
Erich Hoover
Committed by
Alexandre Julliard
Sep 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hhctrl.ocx: Use the correct values for current_tab when some tabs are disabled.
parent
988307e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
help.c
dlls/hhctrl.ocx/help.c
+18
-1
hhctrl.h
dlls/hhctrl.ocx/hhctrl.h
+1
-0
No files found.
dlls/hhctrl.ocx/help.c
View file @
3228b4d1
...
...
@@ -448,6 +448,7 @@ static LRESULT Child_OnSize(HWND hwnd)
static
LRESULT
OnTabChange
(
HWND
hwnd
)
{
HHInfo
*
info
=
(
HHInfo
*
)
GetWindowLongPtrW
(
hwnd
,
GWLP_USERDATA
);
int
tab_id
,
tab_index
,
i
;
TRACE
(
"%p
\n
"
,
hwnd
);
...
...
@@ -457,7 +458,23 @@ static LRESULT OnTabChange(HWND hwnd)
if
(
info
->
tabs
[
info
->
current_tab
].
hwnd
)
ShowWindow
(
info
->
tabs
[
info
->
current_tab
].
hwnd
,
SW_HIDE
);
info
->
current_tab
=
SendMessageW
(
info
->
hwndTabCtrl
,
TCM_GETCURSEL
,
0
,
0
);
tab_id
=
(
int
)
SendMessageW
(
info
->
hwndTabCtrl
,
TCM_GETCURSEL
,
0
,
0
);
/* convert the ID of the tab to an index in our tab list */
tab_index
=
-
1
;
for
(
i
=
0
;
i
<
TAB_NUMTABS
;
i
++
)
{
if
(
info
->
tabs
[
i
].
id
==
tab_id
)
{
tab_index
=
i
;
break
;
}
}
if
(
tab_index
==
-
1
)
{
FIXME
(
"Tab ID %d does not correspond to a valid index in the tab list.
\n
"
,
tab_id
);
return
0
;
}
info
->
current_tab
=
tab_index
;
if
(
info
->
tabs
[
info
->
current_tab
].
hwnd
)
ShowWindow
(
info
->
tabs
[
info
->
current_tab
].
hwnd
,
SW_SHOW
);
...
...
dlls/hhctrl.ocx/hhctrl.h
View file @
3228b4d1
...
...
@@ -111,6 +111,7 @@ typedef struct CHMInfo
#define TAB_INDEX 1
#define TAB_SEARCH 2
#define TAB_FAVORITES 3
#define TAB_NUMTABS TAB_FAVORITES
typedef
struct
{
HWND
hwnd
;
...
...
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