#include "FiveWin.ch"
function Main()
local oWnd
DEFINE WINDOW oWnd TITLE "Test"
@ 2, 2 BUTTON "Help" SIZE 80, 20 ACTION HTMLHelp( 0, "fwclass.chm", 2, 1 )
ACTIVATE WINDOW oWnd
return nil
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
typedef LONG ( * PHTMLHELP ) ( HWND, LPSTR, LONG, LONG );
HB_FUNC( HTMLHELP )
{
HINSTANCE hDLL = LoadLibrary( "hhctrl.ocx" );
PHTMLHELP pHTMLHelp = ( PHTMLHELP ) GetProcAddress( hDLL, "HtmlHelpA" );
pHTMLHelp( ( HWND ) hb_parnl( 1 ), hb_parc( 2 ), hb_parnl( 3 ), hb_parnl( 4 ) );
FreeLibrary( hDLL );
}
#pragma ENDDUMP
Declare Function HtmlHelp Lib "HHCtrl.ocx" Alias "HtmlHelpA" _
(ByVal hwndCaller As Long, _
ByVal pszFile As String, _
ByVal uCommand As Long, _
dwData As Any) As Long
...
dwData Specifies additional data depending on the value of uCommand. Note that in this declaration this argument is declared As Any, because this argument accepts several different data types. You must be careful to pass the correct data type or risk an invalid page fault (also known as general protection fault [GPF]).
Call HtmlHelp(0, "c:\help\Sample.chm", HH_DISPLAY_TOPIC, By Val "Topic1.htm")
Call HtmlHelp(0, "c:\help\Sample.chm>mso_small", HH_DISPLAY_TOPIC, By Val 2001&)
#include "FiveWin.ch"
function Main()
local oWnd
DEFINE WINDOW oWnd TITLE "Test"
@ 2, 2 BUTTON "Help" SIZE 80, 20 ACTION HTMLHelp( 0, "fwclass.chm", 0, "class_todbc.htm" )
ACTIVATE WINDOW oWnd
return nil
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
typedef LONG PASCAL ( * PHTMLHELP ) ( HWND, LPSTR, LONG, LPSTR );
HB_FUNC( HTMLHELP )
{
HINSTANCE hDLL = LoadLibrary( "hhctrl.ocx" );
PHTMLHELP pHTMLHelp = ( PHTMLHELP ) GetProcAddress( hDLL, "HtmlHelpA" );
pHTMLHelp( ( HWND ) hb_parnl( 1 ), hb_parc( 2 ), hb_parnl( 3 ), hb_parc( 4 ) );
FreeLibrary( hDLL );
}
#pragma ENDDUMP
#include "FiveWin.ch"
function Main()
local oDlg
local hDLL := LoadLibrary( "hhctrl.ocx" );
DEFINE DIALOG oDlg TITLE "Test"
@ 2, 2 BUTTON "Help" SIZE 60, 15 ACTION HTMLHelp( oDlg:hWnd, "fwclass.chm", 0, "class_tget.htm" )
ACTIVATE DIALOG oDlg CENTERED
FreeLibrary( hDLL )
return nil
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
typedef LONG PASCAL ( * PHTMLHELP ) ( HWND, LPSTR, LONG, LPSTR );
HB_FUNC( HTMLHELP )
{
HINSTANCE hDLL = LoadLibrary( "hhctrl.ocx" );
PHTMLHELP pHTMLHelp = ( PHTMLHELP ) GetProcAddress( hDLL, "HtmlHelpA" );
if( pHTMLHelp )
pHTMLHelp( ( HWND ) hb_parnl( 1 ), hb_parc( 2 ), hb_parnl( 3 ), hb_parc( 4 ) );
FreeLibrary( hDLL );
}
#pragma ENDDUMP
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 39 guests