Jump to content

HTML help


Recommended Posts

Hi!

I try to use HTML help for my script, but unsuccessful :)

#include <GuiConstants.au3>
#include <WinAPI.au3>

Global Const $HH_DISPLAY_TOPIC      = 0x0
Global Const $HH_HELP_CONTEXT       = 0xF
Global Const $HH_CLOSE_ALL = 0x12

Global $DllRet

$hGUI = GUICreate("Test GUI", 200, 100, -1, -1, BitOR($WS_CAPTION, $WS_POPUP, $WS_SYSMENU), $WS_EX_CONTEXTHELP)

$HelpButton = GUICtrlCreateButton("Help", 65, 40, 60, 25)

GUISetState()

While 1
    Switch GUIGetMsg()
        Case -3
            ExitLoop
        Case $HelpButton
            
            $DllRet = DllCall("HHCtrl.ocx", "hwnd", "HtmlHelp", "hwnd", $hGUI, "str", @ScriptDir & "\test.chm", _
            "int", $HH_DISPLAY_TOPIC, "long", "Default.htm")
            
            $DllRet = $DllRet[0]
            ConsoleWrite($DllRet & @LF)
    EndSwitch
WEnd

DllCall("HHctrl.ocx", "hwnd", "HtmlHelp", "hwnd", $DllRet, "str", @ScriptDir & "\test.chm", "int", $HH_CLOSE_ALL, "int", 0)

Reference

test.zip

Link to comment
Share on other sites

I believe the problem is in the dwData section of the DllCall.

MSDN says:

As long as you are not wanting to jump to diffrent topics within the help file you could alternately use

ShellExecute(@ScriptDir & "\test.chm")
Edited by DarkMatter

[sub]Quantum mechanics: The dreams stuff is made of[/sub]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...