8 Replies Latest reply on Oct 7, 2008 7:09 AM by JohnV11

    Adding Font Button to CHM File

    JohnV11 Level 1
      Hello,

      It seems that Ctrl+Mouse Wheel no longer works in chm files to change text size when IE7 is installed.

      Given that I'm trying to add a Font button to a chm toolbar.

      I'm using RoboHelp X5. I've tried the instructions in Rick Stone's Tips'n Tricks about editing the mpj file. X5 does not have an mpj file so I found that the .cpd file seems to be it's replacement. I edit the cpd file in Access, changing the buttonsflag in Windows table. I add hex 100000 to the number in the 12th position of the Windows line in the hhp file and then convert it decimal and place that number in the Buttonsflag field. However, after compiling in X5, no font button appeared.

      I also tried adding hex 100000 to the number in the 12 position of the hhp file itself and that didn't work either. However, compiling in HTML Workshop does give a font button after modifying the hhp file.

      Does anyone know how to add a font button to a chm file toolbar using X5 or is there a way to get the ctrl+mouse wheel to once again work when viewing chm files?

      Thanks
      John
        • 1. Re: Adding Font Button to CHM File
          Captiv8r Adobe Community Professional & MVP
          Hi John

          I saw another thread recently (not sure if it was here or one of the other lists I watch) where it was being reported about the mouse wheel not working since IE7 was installed. I did a fair amount of Googling after initially seeing that and I concluded that that IE7 did kill the function and I've not seen any posts anywhere that offer workarounds. Bummer, that one.

          On the Font button, you might wish to try looking at the RoboHelp "Behind the scenes" files. Specifically, the file named rhwnd.apj. You may open and edit that file using Windows Notepad.

          Give that a go and please report back if it worked for you.

          Cheers... Rick
          • 2. Re: Adding Font Button to CHM File
            JohnV11 Level 1
            Hi RIck,

            Thanks for the tip about the rhwnd.apj file. I tried modifying the <buttons></buttons> line. Adding the appropriate decimal equivalent (from http://frogleg.mvps.org/helptechnologies/htmlhelp/hhtips.html#addfontbtnchm) to the parameter and also modifying the windows parameter in hhp file does allow me to add or remove buttons.

            However, the one button that I DO want to add, the Font button will not show up using RoboHelp x5. I'm adding hex 100000 to the hhp file and the decimal equivalent to apj file.

            Adding and subtracting the numbers for other buttons works, just not the Font button.

            I also tried modifying the Microsoft HTML Help.ssl file m_dwButtonFlags parameter but that didn't do anything.

            This is almost working! Do you have any ideas why just the FONT button refuses to show up using RoboHelp? It does appear when compiling with HTML Workshop.

            I would appreciate any ideas you might have.

            Thanks
            John
            • 3. Re: Adding Font Button to CHM File
              RoboWizard Level 4
              Hi again John

              Sorry for the delayed reply. I'm on a lunch break while conducting a RoboHelp HTML class.

              The only thing I can think of immediately is to ask if you remembered to also update the .CPD file?

              Aside from that, I'm not sure at the moment.

              Cheers... Rick
              • 4. Re: Adding Font Button to CHM File
                JohnV11 Level 1
                Hi Rick,

                No problem about the response time. I appreciate any help you can give me. Hope your class is going well.

                Yes, I did check the cpd file. It doesn't appear that any updating is necessary. Once I updated the apj file and recompiled to create a new chm, the .cpd had the correct value in the buttonflags. Meaning it had same value as what I placed in the apj file. I'm guessing the apj file took care of the cpd file because up until I modified the apj file the cpd file kept losing my changes.

                It's just very odd that all the other buttons get added and subtracted when modifying the apj and hhp file with the values (decimal and hex) from http://frogleg.mvps.org/helptechnologies/htmlhelp/hhtips.html#addfontbtnchm. It's almost as if RoboHelp doesn't see hex 100000 as the meaning for the Font button. My first thought was that I was adding incorrectly. But since the Font button shows up with HTML WorkShop, I guess I added correctly.

                Also, tried using the hex number 10387E from Microsoft web site http://support.microsoft.com/?kbid=240062 which places all the buttons on the toolbar including Font, but again all buttons show up with RoboHelp except Font and with HTML WorkShop all buttons show up including Font.

                Let me know what you think of this.
                Thanks
                John
                • 5. Re: Adding Font Button to CHM File
                  Level 2
                  John,

                  I don't know if this applies to the latest versions of RoboHelp. I suspect not - or Rick would have mentioned it.

                  RoboHelp used to strip off the sixth (most significant) character of the "buttons" value in the hhp file. This includes Font, TOC Next and TOC Previous. I still manually add this to my hhp file and then compile with HelpWorkshop after I have finished editing with RoboHelp.

                  After you compile with RH, open the hhp in Notepad and see if the buttons value has six digits or has it been stripped to five?

                  Rick has a way of making this stick by tweaking the database - see his Tips and Tricks file. Not having Access, I haven't been able to try this so still do it manually before compilation.

                  John
                  • 6. Re: Adding Font Button to CHM File
                    JohnV11 Level 1
                    John,

                    I checked the hhp file and it does still have 6 digits after compiling in RH. I'm using X5.

                    Yes, I've seen Rick's Tips'n Tricks. X5 file doesn't have an mpj file but I believe the cpd is it's replacement. Anyway, it doesn't appear that needs to be modified here since it appears that after editing the rhwnd.apj file the value sticks in the Windows table of the cpd file. Value also appears to stick in hhp file. Rick may be able to confirm that, but that's what I'm seeing.

                    You mentioned that you edit in RoboHelp and compile in HTML WorkShop. Do you lose anything by compiling in WorkShop instead of RoboHelp? Also what version of RoboHelp do you use?

                    Thanks
                    John
                    • 7. Re: Adding Font Button to CHM File
                      Level 2
                      I don't lose anything (that I know of) by compiling with Help Workshop. I have heard that RH uses the Microsoft compiler, but I actually have found that I get slightly different sized CHM files (a few bytes) compiling the same .hhp from RH or HW so there are some differences.

                      I use RH version 2000. I have compiled with HW for the past decade, but use RH to edit and create the .hhp file. I do this mainly to get the TOC Previous and Next buttons and the flag to remember the users' size and position setting. RH didn't support these early on. I am never totally clear on what they do support now because I run the trial versions for a few days and then decide not to upgrade. Since I deal exclusively with compiled help files - no printed manuals, no web applications, no intranets - I can get away with this until Microsoft decides to 'upgrade' the help viewer.

                      John

                      • 8. Re: Adding Font Button to CHM File
                        JohnV11 Level 1
                        Thanks for the info on HW John.

                        Rick,

                        It looks as if IE7 can open its own help chm so that Zoom (ctrl+mouse wheel) does works. Do you know how IE7 opens its help chm file so that Zoom with the ctrl mouse is working? If you open the IE help chm by itself from c:\windows\help\iexplore,chm, Zoom does not work. However, if you open the help chm from within IE7 from the help menu or by pressing F1, Zoom DOES work.

                        Also, does RoboHelp 7 do a better a job at adding buttons like Font to chm menu?

                        Thanks
                        John