Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to implement html help?

99 views
Skip to first unread message

Fred Hebert

unread,
Jan 31, 2006, 2:22:14 PM1/31/06
to
I am a Delphi programmer trying to learn C++. Right now I am trying to add
HTML help to a simple BDS2006 C++ Win32 app. I already created the .chm
file and can call it from a Delphi app, but so far I can't figure out how
to do it in C++.

The error I am getting is "No context-sensitive help installed". I think I
may not have the HTMLHelpViewer unit added properly.

Searching the help I can't find any relevant info or examples.

Can anyone help?

Remy Lebeau (TeamB)

unread,
Jan 31, 2006, 4:10:46 PM1/31/06
to

"Fred Hebert" <fhe...@nospam.fjhconsulting.com> wrote in message
news:Xns975C92BDD9698fh...@207.105.83.66...

> I am a Delphi programmer trying to learn C++. Right now I am trying
> to add HTML help to a simple BDS2006 C++ Win32 app. I already
> created the .chm file and can call it from a Delphi app, but so far I
can't
> figure out how to do it in C++.

How are you calling it in Delphi? The VCL is the same in both Delphi and
C++, so the approach should be the same.

> The error I am getting is "No context-sensitive help installed".

What EXACTLY are you doing to reproduce that?


Gambit


Fred Hebert

unread,
Jan 31, 2006, 3:49:28 PM1/31/06
to
"Remy Lebeau \(TeamB\)" <no....@no.spam.com> wrote in
news:43dfd1f3$1...@newsgroups.borland.com:

To simplify the problem I did the following:

Step by step Delphi:

Open HelpScribble (my help editor).
- Create a new help project, type = html help, name = test.chm
- Add a topic:
ID: 10
Title: Help Test
Body: The quick brown fox...
- Compile and save help project.

- Open BDS2006
- Create a new Delphi VCL forms app for Win 32 (PHelpTest.bdsproj)
- Set Project | Options | Help File = test.chm
- In the main form property editor set HelpContext = 10
- Add HTMLHelpViewer to the uses clause:
uses
Forms,
HTMLHelpViewer,
Pmain in 'Pmain.pas' {Form1};
- Click run.
- When the form appears press <F1> and magic! the help appears.

Step by step C++:

- Create a new C++ VCL forms app for Win 32 (CHelpTest.bdsproj)
- Set Project | Options | Help File = test.chm
- In the main form property editor set HelpContext = 10
- Add the include:
#include "HTMLHelpViewer.hpp"
- Click run.
- When the form appears press <F1> and instead of help you get an
exception and error dialog "No context-sensitive help installed".

That's about as simple as I can make it.

There must be more to than just including the hpp file. Does it need
some init call or something?

Fred Hebert

unread,
Feb 1, 2006, 9:22:56 AM2/1/06
to
I guess self help means you have to figure it out yourself? ;-)

THE SOLUTION:

Step by step Delphi:

Open HelpScribble (my help editor).
- Create a new help project, type = html help, name = test.chm
- Add a topic:
ID: 10
Title: Help Test
Body: The quick brown fox...
- Compile and save help project.

- Open BDS2006
- Create a new Delphi VCL forms app for Win 32 (PHelpTest.bdsproj)
- Set Project | Options | Help File = test.chm
- In the main form property editor set HelpContext = 10
- Add HTMLHelpViewer to the uses clause:
uses
Forms,
HTMLHelpViewer,
Pmain in 'Pmain.pas' {Form1};
- Click run.
- When the form appears press <F1> and magic! the help appears.

Step by step C++:

- Create a new C++ VCL forms app for Win 32 (CHelpTest.bdsproj)
- Set Project | Options | Help File = test.chm
- In the main form property editor set HelpContext = 10

- Add the include and link:
#include "Cmain.h"
#include "HTMLHelpViewer.hpp"
//------------------------------------
#pragma package(smart_init)
#pragma link "HTMLHelpViewer"
#pragma resource "*.dfm"

0 new messages