API2Help: Creates an HTML or RTF File to Include in a Help System

Click to open or copy the API2Help project files.

This add-in creates documentation for a function prototype. Simply open a source code file in Visual C++ and highlight a function prototype. Then click the add-in. You will be prompted to create either a .rtf file or a .htm file. You can use the resulting file to create help for the function.

To build the sample

  1. Click the link at the beginning of this topic to download the sample files.

  2. In Visual C++, open the project file API2Help.dsp.

  3. Choose an appropriate configuration (Win32 Release is best if you plan to use this add-in).

  4. Click Rebuild All from the Build menu.

To run the add-in

  1. From the Tools menu, click Customize.

  2. Click the Add-ins and Macro Files tab.

  3. Select the API2Help.dll file or browse for it. See Tips for Using Add-ins.

    API2Help creates a small toolbar that is visible when you close the Customize dialog box.

  4. Highlight a function prototype in a source file.

  5. Click the API2Help button on the newly created toolbar, follow the prompts, and fill in the appropriate information in the File Generation Options dialog box.

  6. Modify your help system to include the newly generated files.

This sample demonstrates the following keywords:

CComModule.Init; CWinApp::ExitInstance; CComModule.GetClassObject; CComModule.RegisterServer; CRegKey.Open; CString.LoadString; CRegKey.SetKeyValue; CComModule.UnregisterServer; CFile.Write; CString.LoadString; WriteString; CString.TrimLeft; CString.TrimRight; CString.Find; CString.SetAt; Iapplication; CCommandsObj::CreateInstance; EnableWindow; SetWindowText; CString::GetLength; DoModal