Page 1 of 1

HtmlHelp() problem

Posted: Wed Dec 13, 2006 4:03 pm
by Marc Boissinot
I have problems making HtmlHelp() function work correctly. Following is a small sample that provokes a GPF the second time I press the "Help" button. I'm using FWH 2.8 (Sept. 2006 release) and xHarbour Builder (Oct. 2006 release)

Code: Select all

#include "FiveWin.ch"

function Main()

  DEFINE WINDOW oWnd FROM 10,10 TO 20,30
  @3,8 BUTTON "Help" OF oWnd SIZE 50,20 ACTION (HtmlHelp(0,"c:\fwh\manual\fwclass.chm",2,0))
  ACTIVATE WINDOW oWnd

Anybody having the same problem, or am I missing something ?

Thanks

Posted: Sun Dec 17, 2006 10:21 pm
by Antonio Linares
Marc,

fwh\source\winapi\help32.prg function HtmlHelp() and related need to be modified this way (PASCAL clause was missing):

Code: Select all

DLL32 Function HTMLHelp( ;
   hWnd As LONG, cChmFile As LPSTR, nCommand As LONG, nTopic As LONG ) ;
   As LONG PASCAL From "HtmlHelpA" Lib "hhctrl.ocx"

DLL32 Function HTMLHelpCtx( ;
   hWnd As LONG, cChmFile As LPSTR, nCommand As LONG, cTopic As LPSTR ) ;
   As LONG PASCAL From "HtmlHelpA" Lib "hhctrl.ocx"

DLL32 Function HTMLHelpPopup( ;
   hWnd As LONG, cChmFile As LPSTR, nCommand As LONG, @sPopUp As LPSTR ) ;
   As LONG PASCAL From "HtmlHelpA" Lib "hhctrl.ocx"