Adding What's This? Help to C/C++ applications

The following information is intended for software developers who need to program C/C++ applications to support context-sensitive Help created in What's This? Help Composer. If you are using context-sensitive Help created in RoboHELP (text-only topics or window-level Help), follow the instructions in your Software Developers Kit.

To add What's This? Help to your C/C++ application, you'll add a single line of code in the application's initialization by calling the CSHInitialize() function.

In an MFC application:

  1. Add the following line to the beginning of your main application's C/C++ file:

#include "CSHUser.h"

  1. Add the Initialization code to your application:

BOOL CRHDemoApp::InitInstance()
{

...

//Initialize What's This? Help Composer
if (!CSHInitialize("context.hlp",TRUE))

return FALSE;

 

//The rest of this is included to help you identify the place in InitInstance
//to insert the code. DO NOT reproduce this in your application.

 

//Dispatch commands specified on the command line Default App
if (!ProcessShellCommand(cmdInfo)) Wizard Code

return FALSE;

 

//The main window has been initialized, so show and update it.
pMainFrame->ShowWindow(m_nCmdShow);

 

pMainFrame->UpdateWindow();
 

return TRUE;
}

  1. Copy CSHUser.h to the include directory for your compiler.

  2. Copy the appropriate version of the LIB file (for MS VC++, this is MsCsh.lib) to the lib directory for your compiler.

  3. Rename the file CSH.LIB.

  4. Copy CSH.DLL to your program directory.

  1. Configure your compiler to link to CSH.LIB. In MS VC++, from the Build Menu, select Settings. Select the Link tab. Under Object/Library Modules, type CSH.LIB and click OK.

Note: You need to distribute CSH.DLL with your application.