3 Replies Latest reply on Nov 16, 2006 3:06 PM by johnmccallum

    How to know when a topic does not exist

    LAYALA Level 1
      I have an app that is created with Visual Studio 6, which does not have native support for HTML help (upgrading VS is currently not an option). I have an HTML help that I would like to call from my app. I need to call the html help with a context id number. Since there is no html help calls in this version of VS, I am calling hh.exe directly using ShellExecute ("hh.exe -mapid <id> <chm file>"). I dont know of any other way. The problem I am having is that there are times when my app and the help may be out of sync. It is possible that my app will call the help with an id that does not exist in the help. In WinHelp, the user would get a message indicating that the topic did not exist. Unfortunately, hh.exe does not return any messages. This makes the users think something is wrong with the app.

      Am I doing this the right way? Is there a way to find out if a topic exists and notify the user if it does not?

      Thanks in advance for you help.

      LA
        • 1. Re: How to know when a topic does not exist
          Level 2
          Hi LAYALA,

          We also develop with Visual Studio 6. You can override the WinHelp calls and redirect to HtmlHelp. Our app was originally developed using WinHelp. We made the change to HTMLHelp several years back and my developer claims it only took one line of code, though he's never told me what that line is. If nobody enters into this forum, I'll ask him tomorrow. I'm on Paciifc time so it will be quite a few hours from now.

          John
          • 2. Re: How to know when a topic does not exist
            LAYALA Level 1
            Thanks. I have also found sample code to override the WinHelp call. However, I think it requires Microsoft's HTML Help 1.4 SDK (.lib & .h files). I checked Microsoft's MSDN site and it too has sample code and mentions the SDK. However, the download link is for v1.3 of the SDK even though it says v1.4, so it is no surprise that the code samples fail to compile due to some undefined functions and structures in v1.3.

            LA
            • 3. Re: How to know when a topic does not exist
              Level 2
              I'm sorry for being a bit late with this but here is the code he used.