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
db94b0c6
Commit
db94b0c6
authored
Jan 28, 2010
by
Erich Hoover
Committed by
Alexandre Julliard
Jan 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hhctrl.ocx: Support jumping to a help topic with 'mapid'.
parent
3a824542
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
2 deletions
+36
-2
hhctrl.c
dlls/hhctrl.ocx/hhctrl.c
+36
-2
No files found.
dlls/hhctrl.ocx/hhctrl.c
View file @
db94b0c6
...
...
@@ -272,12 +272,42 @@ HWND WINAPI HtmlHelpA(HWND caller, LPCSTR filename, UINT command, DWORD_PTR data
int
WINAPI
doWinMain
(
HINSTANCE
hInstance
,
LPSTR
szCmdLine
)
{
MSG
msg
;
int
len
,
buflen
;
int
len
,
buflen
,
mapid
=
-
1
;
WCHAR
*
filename
;
char
*
endq
=
NULL
;
hh_process
=
TRUE
;
/* Parse command line option of the HTML Help command.
*
* Note: The only currently handled action is "mapid",
* which corresponds to opening a specific page.
*/
while
(
*
szCmdLine
==
'-'
)
{
LPSTR
space
,
ptr
;
ptr
=
szCmdLine
+
1
;
space
=
strchr
(
ptr
,
' '
);
if
(
!
strncmp
(
ptr
,
"mapid"
,
space
-
ptr
))
{
char
idtxt
[
10
];
ptr
+=
strlen
(
"mapid"
)
+
1
;
space
=
strchr
(
ptr
,
' '
);
memcpy
(
idtxt
,
ptr
,
space
-
ptr
);
idtxt
[
space
-
ptr
]
=
'\0'
;
filename
+=
(
space
-
ptr
)
+
1
;
mapid
=
atoi
(
idtxt
);
szCmdLine
=
space
+
1
;
}
else
{
FIXME
(
"Unhandled HTML Help command line parameter! (%.*s)
\n
"
,
space
-
szCmdLine
,
szCmdLine
);
return
0
;
}
}
/* FIXME: Check szCmdLine for bad arguments */
if
(
*
szCmdLine
==
'\"'
)
endq
=
strchr
(
++
szCmdLine
,
'\"'
);
...
...
@@ -291,7 +321,11 @@ int WINAPI doWinMain(HINSTANCE hInstance, LPSTR szCmdLine)
MultiByteToWideChar
(
CP_ACP
,
0
,
szCmdLine
,
len
,
filename
,
buflen
);
filename
[
buflen
-
1
]
=
0
;
HtmlHelpW
(
GetDesktopWindow
(),
filename
,
HH_DISPLAY_TOPIC
,
0
);
/* Open a specific help topic */
if
(
mapid
!=
-
1
)
HtmlHelpW
(
GetDesktopWindow
(),
filename
,
HH_HELP_CONTEXT
,
mapid
);
else
HtmlHelpW
(
GetDesktopWindow
(),
filename
,
HH_DISPLAY_TOPIC
,
0
);
heap_free
(
filename
);
...
...
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