I am new to help authoring and need some additional direction to implement dual mode context sensitive help in my Delphi 5 application. My application is successfully using the CHM file via the EHS components, but I'm not sure how to tell it to use the separately created WinHelp file containing popup information.
Thanks in advance.
Jeff
Dual Mode Context Sensitive Help in Delphi 5
Moderators: Alexander Halser, Michael Schwarzl
- Alexander Halser
- EC-Software Support
- Posts: 4106
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
Alexander,
Thanks for pointing me in the right direction, but still don't understand something. Help & Manual is creating two files: MyApp.chm and MyApp_popup.hlp. I have the following line of code in the OnCreate event of my main form:
Application.HelpFile := ExtractFilePath(Application.ExeName) + 'MyApp.hlp';
I have the following properties set in the HelpRouter:
CHMPopupTopics := MyApp_popup.hlp;
HelpType := htMixedMode;
With this configuration, the popup file is not found. The error message says it's looking for MyApp.hlp. If I change the name of MyApp_popup.hlp to MyApp.hlp, everything works, but that seems to defeat the purpose of setting the CHMPopupTopics property.
Am I doing something wrong or does my popup file have to have the same name as the .hlp file I'm defining OnCreate of the form?
Thanks!
Thanks for pointing me in the right direction, but still don't understand something. Help & Manual is creating two files: MyApp.chm and MyApp_popup.hlp. I have the following line of code in the OnCreate event of my main form:
Application.HelpFile := ExtractFilePath(Application.ExeName) + 'MyApp.hlp';
I have the following properties set in the HelpRouter:
CHMPopupTopics := MyApp_popup.hlp;
HelpType := htMixedMode;
With this configuration, the popup file is not found. The error message says it's looking for MyApp.hlp. If I change the name of MyApp_popup.hlp to MyApp.hlp, everything works, but that seems to defeat the purpose of setting the CHMPopupTopics property.
Am I doing something wrong or does my popup file have to have the same name as the .hlp file I'm defining OnCreate of the form?
Thanks!
- Alexander Halser
- EC-Software Support
- Posts: 4106
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
I have to check this out. Could be that we have a bug here in THelpRouter. The CHMPopupTopics property was earlier used to specify the internal text file for plain text popups (not mixed mode) to make THelpRouter compatible with other help authoring tools, too.
As a workaround, please use the same file name for the HLP popups as for the CHM file. You can change the popup HLP file name in Help & Manual in Project|Properties -> HTML Help. Just remove "_popup" from the file name.
As a workaround, please use the same file name for the HLP popups as for the CHM file. You can change the popup HLP file name in Help & Manual in Project|Properties -> HTML Help. Just remove "_popup" from the file name.
Alexander Halser
Senior Software Architect, EC Software GmbH
Senior Software Architect, EC Software GmbH
THelpRouter Creates AV
I found another bug in the THelpRouter component, and I'm hoping to find a workaround. My shareware application has an initial nag screen that gives the user the option to accept the shareware terms or cancel the application from running. If the cancel button is clicked, the application is terminated. Since I changed the THelpRouter HelpType property to htMixedMode, the cancel button on my shareware form results in an AV. If I change the property to htWinHelp or remove the component from my main form, the application terminates normally.
Any clues or workarounds? Thanks.
Any clues or workarounds? Thanks.
- Alexander Halser
- EC-Software Support
- Posts: 4106
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
Sounds as if you use an older version of EHS.
We changed one important detail regarding HTML Help and THelpRouter: previous versions used the main window handle of the application in the call to the HTML Help API. Version 1.40 does not. It rather uses 0 as the window handle. This results in a slightly different behaviour: the HTML Help browser window was always on top of the calling application when the window handle was used (this was the actual reason why we removed it) and the window handle was required for every help call, even for the call to close eventually opened help windows. I could imagine that if you terminate your application with HALT;, the help router crashes if it was initialized at this point.
We changed one important detail regarding HTML Help and THelpRouter: previous versions used the main window handle of the application in the call to the HTML Help API. Version 1.40 does not. It rather uses 0 as the window handle. This results in a slightly different behaviour: the HTML Help browser window was always on top of the calling application when the window handle was used (this was the actual reason why we removed it) and the window handle was required for every help call, even for the call to close eventually opened help windows. I could imagine that if you terminate your application with HALT;, the help router crashes if it was initialized at this point.
Alexander Halser
Senior Software Architect, EC Software GmbH
Senior Software Architect, EC Software GmbH