Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than user32, prefix the name with the module name and a period.
<DllImport("user32.dll", SetLastError:=True, Charset:=Charset.Ansi)> _
Public Function bool WinHelp(hWndMain As IntPtr, _
<MarshalAs(UnmanagedType.LPStr)>lpszHelp As String, _
uCommand As UInteger, _
dwData As UInteger) As <MarshalAs(UnmanagedType.Bool)> Boolean
End function
User-Defined Types:
None.
Notes:
Here are the constants defined in Winver.h:
// Commands to pass to WinHelp()
const uint HELP_CONTEXT = 0x0001; /* Display topic in ulTopic */
const uint HELP_QUIT = 0x0002; /* Terminate help */
const uint HELP_INDEX = 0x0003; /* Display index */
const uint HELP_CONTENTS = 0x0003;
const uint HELP_HELPONHELP = 0x0004; /* Display help on using help */
const uint HELP_SETINDEX = 0x0005; /* Set current Index for multi index help */
const uint HELP_SETCONTENTS = 0x0005;
const uint HELP_CONTEXTPOPUP = 0x0008;
const uint HELP_FORCEFILE = 0x0009;
const uint HELP_KEY = 0x0101; /* Display topic for keyword in offabData */
const uint HELP_COMMAND = 0x0102;
const uint HELP_PARTIALKEY = 0x0105;
const uint HELP_MULTIKEY = 0x0201;
const uint HELP_SETWINPOS = 0x0203;
const uint HELP_CONTEXTMENU = 0x000a;
const uint HELP_FINDER = 0x000b;
const uint HELP_WM_HELP = 0x000c;
const uint HELP_SETPOPUP_POS = 0x000d;
IntPtr ParentHWnd = new IntPtr(0);
ParentHWnd = FindWindow(lpszClass, lpszWindow);
if (!ParentHWnd.Equals(IntPtr.Zero))
{
bool ret = WinHelp(ParentHWnd, "Your help file.hlp", HELP_CONTEXT, YOUR_CONTEXT_SENSITIVE_HELP_ID);
}
Alternative Managed API:
Do you know one? Please contribute it!
Click to read this page
2/5/2012 11:31:14 PM - -202.74.138.1
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).