Displaying HTML help from an Activex Control

This section is for programmers. Please use it for all discussons on interfacing help with your applications and related subjects.

Moderators: Alexander Halser, Michael Schwarzl

Post Reply
sboydlns
Posts: 3
Joined: Thu Jan 24, 2008 5:03 pm

Displaying HTML help from an Activex Control

Unread post by sboydlns »

I am using Delphi 2007 and I want to display HTML help from an Activex Control. I include HtmlHelpViewer in the uses list and everything goes just fine until the application terminates. It then hangs. The activex is hanging on a call to HtmlHelp(0, 0, HH_CLOSE_ALL, 0). I haven't been able to find an solutions to this using Google. I was wondering if anyone here had any ideas.
Pete Lees
MS MVP (currently on leave)
Posts: 172
Joined: Fri Mar 21, 2003 1:31 pm
Location: Bracknell, Berkshire, UK

Unread post by Pete Lees »

Hi,

Does this article help?

http://helpware.net/FAR/far_faq.htm#HH_CLOSE_ALL

Pete
sboydlns
Posts: 3
Joined: Thu Jan 24, 2008 5:03 pm

Unread post by sboydlns »

I have seen that article but I can't see how to apply it to my situation. The HtmlHelp handling is done deep in the guts of the Delphi run time and I don't have a great deal of control over it. I suppose I could implement my own HtmlHelp handler but I was hoping to avoid that.
sboydlns
Posts: 3
Joined: Thu Jan 24, 2008 5:03 pm

Unread post by sboydlns »

I found the problem. There is a bug in HtmlHelpViewer. If you don't display any help pages it never issues the HH_INITIALIZE command but it always issues the HH_CLOSE_ALL command when the application shuts down. This causes the hang. A workaround is to put HtmlHelp(0, nil, HH_INITIALIZE, &dummy) into the start up code of the ActiveX.
Post Reply