Adobe 65030089 - Robohelp - PC Using Manual page 267

User manual
Hide thumbs Also See for 65030089 - Robohelp - PC:
Table of Contents

Advertisement

USING ROBOHELP HTML 10
Context-sensitive Help
Private Declare Function ShellExecute Lib _
"shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
The
function requires an explicit filename or URL. But for context-sensitive Help, it is better to code the
ShowHelp
application to use context IDs rather than explicit topic names. Use the following sample function,
which maps integer context IDs to topic name strings, then calls
Public Function ShowHelpContext(nContextId As Integer) As Boolean
Dim strTopic As String
Dim bIsLocal As Boolean
bIsLocal = True
Select Case nContextId
Case HH_GADGET_DIALOG
strTopic = "gadget.htm"
Case HH_WHATSIT_DIALOG
strTopic = "whatsit.htm"
Case HH_WIDGET_DIALOG
strTopic = "widget.htm"
Case HH_TECH_SUPPORT:
strTopic = "http://www.mycompany.com"
bIsLocal = False
Case Else
strTopic = "unknown-context.htm"
End Select
ShowHelpContext = ShowHelp(strTopic, bIsLocal)
End Function
..............................................................................................................................................
Using
makes maintaining context-sensitive Help much easier because, if a topic name changes,
ShowHelpContext
only one function must be modified. Declare context IDs (for example,
shared among the program modules that use context-sensitive WebHelp or WebHelp Pro.
Const HH_GADGET_DIALOG As Integer = 1
Const HH_WHATSIT_DIALOG As Integer = 2
Const HH_WIDGET_DIALOG As Integer = 3
Const HH_TECH_SUPPORT As Integer = 4
Connect context-sensitive WebHelp and WebHelp Pro topics to Visual C++ applications
Note: This information is for developers who must connect context-sensitive WebHelp and WebHelp Pro topics to Visual
C++ applications.
The sample code provided here uses a function called
browser type.
The
function has two parameters:
ShowHelp
Boolean value. It indicates whether the first parameter is a local filename (
local,
tells the browser to find the file in the Help subfolder of the application folder.
ShowHelp
ShowHelp
HH_GADGET_DIALOG
that opens a local or remote topic regardless of the
ShowHelp
takes a URL or local filename as a value, and
szTopic
Last updated 7/13/2012
ShowHelpContext
to launch the topic.
) as constants that can be
bIsLocal
) or remote URL (
TRUE
FALSE
261
,
takes a
). If the file is

Advertisement

Table of Contents
loading

This manual is also suitable for:

Robohelp html 10

Table of Contents