Compiling Scribble’s Help from the Development Environment

You can easily prepare Scribble to compile the new Help files from within the development environment, by performing the following two procedures.

To add Scribble.hpj to the project

  1. With your Scribble project open, from the Project menu, click Add to Project. Then click Files.

  2. In the Insert Files into Project dialog box, navigate to the \HLP directory underneath the Scribble project root directory and specify Scribble.hpj.

  3. Click OK.

    The file now appears under Source Files in FileView.

To add the HLP directory to the project

  1. Select the name of the project (Scribble) in File View.

  2. Right click and select New Folder from the shortcut menu.

  3. Name the new folder Help Files.

  4. Right click on the Help Files folder and select Add Files to Folder.

  5. From the Insert Files into Project dialog box, select all the files in the HLP directory of the Scribble project.

When AppWizard adds context-sensitive Help support, it implements special build options for the application’s Help Project file. You can duplicate this functionality by specifying Custom Build settings for Scribble.hpj, Scribble.cnt and resource.h. Once you complete this step, you can build Scribble.hpj from within the development environment.

To specify custom build settings

  1. From the Project menu, choose Settings.

    The Project Settings dialog box opens.

  2. In the Settings For area, expand the Scribble icon and the Source Files folder and select Scribble.hpj.

    You can simultaneously select Scribble.hpj in both the Debug and Release project build types by clicking the combo box located above the Settings For area and clicking All Configurations.

  3. Click the Custom Build tab.

  4. In the Build Command(s) box, copy the following custom build rules into the Commands box:
    start /wait hcw /C /E /M "hlp\$(InputName).hpj"
    if errorlevel 1 goto :Error
    if not exist "hlp\$(InputName).cnt" goto :Error
    if not exist "hlp\$(InputName).hlp" goto :Error
    copy "hlp\$(InputName).hlp" $(OutDir)
    goto :done
    :Error
    echo "hlp\$(InputName).hpj(1)" : error: Problem encountered creating help file
    type "hlp\$(InputName).log"
    :done
    
  5. In the Output File(s) edit box, type the following:
    $(OutDir)\$(InputName).hlp
    
  6. Select the Resource.h file and copy the following custom build rules into the Commands box:
    echo. >>"hlp\$(TargetName).hm"
    echo // Commands (ID_* and IDM_*) >>"hlp\$(TargetName).hm"
    makehm ID_,HID_,0x10000 IDM_,HIDM_,0x10000 resource.h >>"hlp\$(TargetName).hm"
    echo. >>"hlp\$(TargetName).hm"
    echo // Prompts (IDP_*) >>"hlp\$(TargetName).hm"
    makehm IDP_,HIDP_,0x30000 resource.h >>"hlp\$(TargetName).hm"
    echo. >>"hlp\$(TargetName).hm"
    echo // Resources (IDR_*) >>"hlp\$(TargetName).hm"
    makehm IDR_,HIDR_,0x20000 resource.h >>"hlp\$(TargetName).hm"
    echo. >>"hlp\$(TargetName).hm"
    echo // Dialogs (IDD_*) >>"hlp\$(TargetName).hm"
    makehm IDD_,HIDD_,0x20000 resource.h >>"hlp\$(TargetName).hm"
    echo. >>"hlp\$(TargetName).hm"
    echo // Frame Controls (IDW_*) >>"hlp\$(TargetName).hm"
    makehm IDW_,HIDW_,0x50000 resource.h >>"hlp\$(TargetName).hm"
    
  7. In the Output File(s) edit box, type the following:
    hlp\$(TargetName).hm
    
  8. Select the project’s .cnt file and copy the following custom build rules into the Commands box:
    copy "hlp\$(InputName).cnt" $(OutDir)
    
  9. In the Output File(s) edit box, type the following:
    $(OutDir)\$(InputName).cnt
    
  10. Click OK.

    You can now compile Scribble.hlp from the development environment anytime you need to update the contents of the Help Project files.

To compile Scribble Help from within the development environment

  1. After completing the previous two procedures, in FileView, expand Source Files and select Scribble.hpj.

  2. From the Build menu, click Compile Scribble.hpj.

You can also simply build Scribble.exe at this point to see Scribble running with full application Help support.

To try out Scribble's Help

  1. From the Build menu, click Execute Scribble.exe. Click Yes when prompted to build.

  2. From the Help menu, click Help Topics.

  3. In the Contents tab, expand the Menus heading, and double-click the Pen menu topic.

    This is the topic you added to Scribble’s Help system by editing the .CNT and .HPJ files. You’ll see the custom Help that has been provided in Pen.rtf.

  4. Return to the Scribble application, and press SHIFT+F1 to enter Help mode, then click one of the items on Scribble’s Pen menu.

    Help mode, invoked by pressing SHIFT+F1, is another way for users to access Scribble application Help topics.

  5. Click the Index and Find commands in the Help Topics dialog box to see the Windows Help interface.