Board index » cppbuilder » Help File Integration

Help File Integration

Hello All,

I am working on adding HTML help to the controls. First I have tried to
create a simple application and then associated a .chm file to the form.
Then on the different controls assigned the HelpIDs. But when I run the
application and press F1, a message pops up saying  "The file is not Windows
help file or the file is corrupted.". BUt when I tried to use the same file
in the VB application it worked fine. What could be the problem?

Thanks,
Sundeep.

 

Re:Help File Integration


The built-in help file support in the VCL only supports Windows help files
and not HTML help files. You must manually support HTML help file processing
outside of the VCL support by trapping the appropriate help messages, such
as WM_HELP, and calling the appropriate HTML Help functions.

Quote
"Sundeep Gawande" <sundeep_gawa...@persistent.co.in> wrote in message

news:3cc96cc7_1@dnews...
Quote
> Hello All,

> I am working on adding HTML help to the controls. First I have tried to
> create a simple application and then associated a .chm file to the form.
> Then on the different controls assigned the HelpIDs. But when I run the
> application and press F1, a message pops up saying  "The file is not
Windows
> help file or the file is corrupted.". BUt when I tried to use the same
file
> in the VB application it worked fine. What could be the problem?

Re:Help File Integration


Hello Edward,

Thanks for that note.
But now I am facing some different problem. I am working on ActiveForm OCX
controls. I tried  to call the HTML API by loading the "HHCtrl.ocx" library
and then doing GetProcAddress for "HtmlHelpW" function. I get the function
address but calling the function doesn't seems to work. The same thing do
work in simple application.

Giving the code for reference:

typedef HWND WINAPI HtmlHelp(HWND hwndCaller, LPCWSTR pszFile, UINT
uCommand, DWORDdwData);

HtmlHelp *htmlHelp;

        HInstance hinstance = LoadLibrary("HHCtrl.ocx" );
        if (hinstance )
        {
             htmlHelp = (HtmlHelp*) GetProcAddress(hinstance , "HtmlHelpW");
        }

I am giving the call to the function in the help event handler of the
ActiveForm and simple application form.

// Simple Application

bool __fastcall TForm::FormHelp(WORD Command, int Data, bool &CallHelp)
{

  (*htmlHelp)  ( this->Handle, WideString("filename.chm"), HH_HELP_CONTEXT,
Data); /// It works here

Quote
}

// Active form Activex control

bool __fastcall THelpTestImpl::HelpEvent(unsigned short Command, int Data,
bool &CallHelp)
{

  (*m_VclCtl->htmlHelp) (m_VclCtl->Handle, WideString("filename.chm"),
                                               HH_HELP_CONTEXT, Data);  //
It doesn't work here.

  Fire_OnHelp();

Quote
}

Could you or anyone  see any glitch over here? I am really wondering why it
doesn't work here. Could anyone  please help me with this.

Thanks,
Sundeep.

Quote
"Edward Diener" <eddie...@tropicsoft.com> wrote in message

news:3cc99ff1$1_1@dnews...
Quote
> The built-in help file support in the VCL only supports Windows help files
> and not HTML help files. You must manually support HTML help file
processing
> outside of the VCL support by trapping the appropriate help messages, such
> as WM_HELP, and calling the appropriate HTML Help functions.

> "Sundeep Gawande" <sundeep_gawa...@persistent.co.in> wrote in message
> news:3cc96cc7_1@dnews...
> > Hello All,

> > I am working on adding HTML help to the controls. First I have tried to
> > create a simple application and then associated a .chm file to the form.
> > Then on the different controls assigned the HelpIDs. But when I run the
> > application and press F1, a message pops up saying  "The file is not
> Windows
> > help file or the file is corrupted.". BUt when I tried to use the same
> file
> > in the VB application it worked fine. What could be the problem?

Other Threads