Context Sensitive Help - Help Authoring Site

home Buy This Domain search
Help Authoring: Context Sensitive Help - Help Authoring Site

Context Sensitive Help - Help Authoring Site

Other programs can open Help files, and if context sensitive Help has been implemented, then the other application can open the Help file on a relevant page.

Programs normally call context sensitive help by passing a 'Topic number'. This number can be entered in the Topic dialog along side the Topic name.

EasyHelp/Web will then generate the help file with the topic (context) numbers. It is really then up to coding your program correctly. With Visual basic the topic number can be entered as one of the properties of the dialog or control.

More About Context numbers

You can enter context numbers in decimal (e.g. 100) or Hex (e.g. 0x64) in the Topic dialog. Also you could enter them in the 'details file, which is normally quicker when you have a lot to do! Remember to process and Build after.



^^ ^^

Also if your programmers have already provided a 'map' file you can use this instead of putting the number in yourself.

Simply put the .MAP file in the 'Intermediate' files path. The name should be the same a the document name or, if building a multiple document help files, the same as the project name.

An example map file is shown below (EX7.MAP)

#define Examples 0x64

^^ ^^

Topic name Topic Number

Useful VB for calling Help

'Help Constants

Global Const HELP_CONTEXT = &H1 'Display topic in ulTopic

Global Const HELP_QUIT = &H2 'Terminate help

Global Const HELP_INDEX = &H3 'Display index

Global Const HELP_CONTENTS = &H3

Global Const HELP_HELPONHELP = &H4 'Display help on using help

Global Const HELP_SETINDEX = &H5 'Set the current Index for multi index help



Global Const HELP_FORCEFILE = &H9

Global Const HELP_KEY = &H101 'Display topic for keyword in offabData

Global Const HELP_COMMAND = &H102

Global Const HELP_PARTIALKEY = &H105 'call the search engine in winhelp

Declare Function WinHelp Lib "User" (ByVal hWnd As Integer, ByVal lpHelpFile As String, ByVal wCommand As Integer, dwData As Any) As Integer

1 Calling the Search dialog in Help

Sub mnuHelpSearch_Click ()

Dim Search$

Dim X%

Search$ = ""

X = WinHelp(ByVal 0&, "c:\your\helpfile\name.hlp", HELP_PARTIALKEY, ByVal Search$)

End Sub

2 Calling a topic from a menu action etc

Sub mnu_Click ()


End Sub

Sub DisplayHelp (ContextId&)

Dim X%

X% = WinHelp(ByVal 0&, "d:\dev\hlp\skeleton.hlp", HELP_CONTEXT, ByVal ContextId&)

End Sub

Note the use of ByVal on the ContextId& it is a common mistake to miss them off!

Note that the first parameter to WinHelp should really be the Window Handle rather than 0&

Note Programs that use only alphanumeric references allow you to call Context numbers via a statement. In other words the alphanumeric statement does the same as a number, only it uses the statement to call the number.

Help Authoring: Context Sensitive Help - Help Authoring Site

Amazon Prime Free Trial

Help Authoring: Context Sensitive Help - Help Authoring Site