PRB: Problems with Help Compiler 3.5 and Certain RTF Formats (200095)



The information in this article applies to:

  • Microsoft Visual C++, Macintosh Cross-Development Addon 4.0
  • Microsoft Visual C++, Macintosh Cross-Development Addon 4.0b

This article was previously published under Q200095

SYMPTOMS

When compiling a Help project using Hc35.exe targeted for the Macintosh platform, the following error may occur:

On Windows NT:
An OS/2 program caused a protection violation.
On Windows 95:
Error 4639: Error in file 'xxxx.rtf' at byte offset 0xXXXX
-or-
Error 4860: topic...: Font xxxx in file 'xxxx.rtf' not in RTF Font Table

CAUSE

Hc35.exe is not compatible with the RTF (Rich Text Format) files generated by Microsoft Word 6.0 and later.

RESOLUTION

Save the RTF file using Microsoft Word 2.0, or use Hc31.exe.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

When compiling the Help project for the Macintosh target, Hc35.exe is used to generate the Help file. However, Hc35.exe fails to read RTF files generated by Microsoft Word 6.0 and later (ROBOHELP is also known to generate Word 6.0 RTF files). Under Windows NT, Hc35.exe usually generates a protection violation because it doesn't understand the font table in these RTF files. If the OS/2 subsystem isn't installed properly, no error message may appear and the Help compiler will just hang. For small Help files under Windows 95, the Help compiler may successfully compile these Help files, but some errors may still occur.

The best workaround is to save the RTF file using Microsoft Word 2.0 or Microsoft Word for the Macintosh.

Another feasible workaround is to use Hc31.exe. To properly generate a Help file for the Macintosh using Hc31.exe, the bitmaps must be converted so that it displays properly (the display is too small). Perform the following steps:
  1. Copy all bitmaps into a separate directory, changing the file extension to .mac.
  2. Run MRBC (Multi-Resolution Bitmap Compiler) on each bitmap separately (do not use wild cards; otherwise, all the bitmaps will be combined) with the /s switch. If you are familiar with batch files, you can use this statement:
    for   %%f   in   (*.mac)   do   mrbc   /s   %%f
    						
    This will generate .mrb files.
  3. Rename all the files to the original name. Now you have two sets of files for the different platforms in different directories. You can specify which directories the Help compiler can obtain the bitmaps from by using the BMROOT keyword in the Help project.
  4. Transfer the Help file to the Macintosh as you normally would:

    MFILE COPY /t HELP /c MSH2 MYHELP.HLP
    ":MyMac:Local:MyHelp"

REFERENCES

Books Online: Creating Macintosh Help Files

Modification Type:MinorLast Reviewed:4/19/2004
Keywords:kbprb KB200095