Sign in to follow this  
Followers 0
rasim

HTML help

3 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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]

Share this post


Link to post
Share on other sites

Anyone?

I not believe that this impossible in AutoIt.

Share this post


Link to post
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
Sign in to follow this  
Followers 0