LogicSmith

Visual Basic and WinHelp

Help from a Button

In authoring parlance, this is known as "dialog-level context sensitivity". Typically, each dialog in an application would include a Help button. When the user clicks this button, they would see a topic explaining just that dialog. In the days before WhatsThis help, this topic might have included a screen capture of the dialog, linked to popups explaining each control. If you have WhatsThis help, however, there is no need to capture the screen to do this. A dialog help button might use code like this:

lReturn = WinHelpNum(hWnd, sHelpFile, HELP_CONTEXT, lContextID)

The hWnd and sHelpFile parameters are typically the same used elsewhere in the application, although the help file name may have a secondary window name appended. The lContextID parameter contains a topic ID number, which may be typically found in the HelpContextID property of the form where the API call is triggered.


Copyright © 2009 by Dana Cline
Last Updated  Monday, April 06, 2009
Website hosted by 1and1