Login to participate
Register   Lost ID/password?
Louis Kessler's Behold Blog » Blog Entry           prev Prev   Next next

Sunday, April 10, 2005 - Sun, 10 Apr 2005

The difficult things are easy but the simple things are hard.

I was expecting that undoing the file associations at uninstall time would be difficult. I have often run into unexpected difficulties when trying to interact with the Windows Operating System. But this went very smoothly and did not take long.

So then I went to hook up the Help file so that the F1 key would bring up the appropriate Help screen depending on which window you are in. This led to 2 days of pulling my hair out. I have 22 different Help screens in my Help file now. Each is given a context number when it is created. Delphi has a place to store the context number to use for each form and most objects on the form.

Pressing an object with context number 15 should bring up Help screen number 15. It didn’t. In fact the results almost seemed random. I tried to determine if this was a problem with the Help file, with Delphi, or with the connection between Delphi and the Help file. I tried all sorts of things, tested, and googled the web to find the solution or maybe a bug in Delphi. Didn’t make much headway.

Finally, today I got lucky and found a workaround. By tracing the Help calls into the Delphi source code, I got to the InvokeHelp routine in Delphi that did the work. Although I couldn’t see what was wrong with InvokeHelp, I was able to bypass it and call the Windows WinHelp function directly. Doing that finally got the correct Help screen to come up.

For now, that’s done and out of the way. I had almost thought I’d never get it to work, so I’m quite relieved. Now I can finish up what’s needed to get release 0.92 out.

No Comments Yet

Leave a Comment

You must login to comment.

Login to participate
Register   Lost ID/password?