HOWTO: Call the Windows Help Search Dialog Box from Application

ID: Q86268


The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK)
  • Microsoft Windows Software Development Kit (SDK) 3.1
  • Microsoft Windows 2000


SUMMARY

In the Microsoft Windows environment, an application can invoke the Search dialog box of the Windows Help application independent of the main help window. For example, many applications have an item like "Search for Help on" in their Help menus.

An application can invoke the Search dialog box via the WinHelp function by specifying HELP_PARTIALKEY as the value for the fuCommand parameter and by specifying a pointer to an empty string for the dwData parameter. The following code demonstrates how to call the Windows Help Search dialog box from an application:


   LPSTR lpszDummy,
         lpszHelpFile;

   // Allocate memory for strings.
   lpszDummy = malloc(5);
   lpszHelpFile = malloc(MAX_PATH);

   // Initialize an empty string.
   lstrcpy(lpszDummy, "");

   // Initialize the help filename.
   lstrcpy(lpszHelpFile, "c:\\windows\\myhelp.hlp");

   // Call WinHelp function.
   WinHelp(hWnd, lpszHelpFile, HELP_PARTIALKEY, (DWORD)lpszDummy); 

Additional query words:

Keywords : kbWinHelp kbNTOS kbWinOS2000 kbSDKWin32 kbGrpUser kbWinOS
Version : WINDOWS:3.1
Platform : WINDOWS
Issue type : kbhowto


Last Reviewed: January 27, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.