Integrer un fichier d'aide au format *.CHM

cs_sessime Messages postés 1 Date d'inscription mercredi 13 août 2003 Statut Membre Dernière intervention 13 août 2003 - 13 août 2003 à 22:03
ShareVB Messages postés 2676 Date d'inscription vendredi 28 juin 2002 Statut Membre Dernière intervention 13 janvier 2016 - 15 août 2003 à 09:59
Salut,
Je voudrais integrer ou appeler mon fichier d'aide au format CHM dans une application ecrite en DELPHI 5.0 mais je n'arrive pas ..
Aidez moi

1 réponse

ShareVB Messages postés 2676 Date d'inscription vendredi 28 juin 2002 Statut Membre Dernière intervention 13 janvier 2016 26
15 août 2003 à 09:59
salut

je voudrais pas te contrarier mais a on est sur VBFrance donc tes chances de recevoir une réponses pour DELPHI est minime :

sinon voila un exemple VB provenant de MSDN [Q183434] :

"More Information
The steps needed to use the HTML Help API in a Visual Basic application are:

Declare the HTML Help constants.

Declare the HtmlHelp() function.

Call the HtmlHelp() function with valid parameters.

The following code fragments demonstrate these steps:

The HTML Help constants are defined as follows:
Const HH_DISPLAY_TOPIC = &H0
Const HH_SET_WIN_TYPE = &H4
Const HH_GET_WIN_TYPE = &H5
Const HH_GET_WIN_HANDLE = &H6
Const HH_DISPLAY_TEXT_POPUP = &HE ' Display string resource ID or
' text in a pop-up window.
Const HH_HELP_CONTEXT = &HF ' Display mapped numeric value in
' dwData.
Const HH_TP_HELP_CONTEXTMENU = &H10 ' Text pop-up help, similar to
' WinHelp's HELP_CONTEXTMENU.
Const HH_TP_HELP_WM_HELP = &H11 ' text pop-up help, similar to
' WinHelp's HELP_WM_HELP.

The HtmlHelp() function is declared as follows:
Declare Function HtmlHelp Lib "hhctrl.ocx" Alias "HtmlHelpA" _
(ByVal hwndCaller As Long, ByVal pszFile As String, _
ByVal uCommand As Long, ByVal dwData As Long) As Long

The following are examples of how to call the HTML Help API from Visual Basic:
' HTML Help file launched in response to a button click:
Private Sub HH_DISPLAY_Click()
'hWnd is a Long defined elsewhere to be the window handle
'that will be the parent to the help window.
Dim hwndHelp As Long
'The return value is the window handle of the created help window.
hwndHelp = HtmlHelp(hWnd, "myfile.chm", HH_DISPLAY_TOPIC, 0)
End Sub

' A specific topic identified by the variable ContextID is launched
' in response to this button click:
Private Sub HH_HELP_Click()
Dim hwndHelp As Long
'The return value is the window handle of the created help window.
hwndHelp = HtmlHelp(hWnd, "myfile.chm", HH_HELP_CONTEXT, ContextID)
End Sub
"

voila : à toi de l'adapter à DELPHI

ShareVB
0
Rejoignez-nous