Winhelp Function

  • Thread starter Thread starter Adriaan Wakefield
  • Start date Start date
A

Adriaan Wakefield

Im having trouble using the winhelp function properly. Im trying to get a
help button in a form pop to the correct context id page in my help file.
The first and third parameter of the Winhelp function are confusing me. I
have no idea what the first does and I cant find a listing of what values
need to be placed in the third. If I set the wCommand value (third paramter)
to 3 i can get the help file to pop but always to the first page, it ignores
the cid. Anyone know what Im doing wrong? Heres the function declaration if
it helps jog memory. The constant on the bottom I use for the wCommand
parameter. dwData is where the Cid belongs.


Public Declare Function WinHelp Lib "user32" Alias "WinHelpA" _
(ByVal hwnd As Long, _
ByVal lpHelpFile As String, _
ByVal wCommand As Long, _
ByVal dwData As Long) As Long
Public Const HELP_CONTEXT = &H3&
 
Adriaan,
Im having trouble using the winhelp function properly. Im trying to get a
help button in a form pop to the correct context id page in my help file.
The first and third parameter of the Winhelp function are confusing me. I
have no idea what the first does and I cant find a listing of what values
need to be placed in the third.

You may want to try Paul O'Rear's HelpAPI VBA module, which is a
simple module for calling WinHelp or HTML Help files from Office
applications. It's available from here:

http://www.helpfulsolutions.com

The four parameters for the WinHelp function are described here:

http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/functions/winhelp.asp
 
Back
Top