Bonjour, j'essaye depuis un long moment de faire une GUI avec HtmLayout sans succès, HtmLayout est un moteur de rendu Html/CSS.
Le SDK est dispo ici :
http://www.terrainformatica.com/htmlayout/
n'étant pas expert en DLL ou en code c/c++, j'ai un mal fou a comprendre comment le faire fonctionner, voici ce que j'ai réussi a faire :
► Afficher le texte
Code : Tout sélectionner
#include <StructureConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <WinAPI.au3>
$dll = DllOpen(@ScriptDir&"\htmlayout.dll")
$result = DllCall($dll, "wstr", "HTMLayoutClassNameW")
$test = $result[0]
$t = GUICreate("test",500,500,200,200)
GUISetState(@SW_SHOW)
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
$r = _WinAPI_CreateWindowEx(0, $test, "test", BitOR($WS_CHILD, $WS_VISIBLE, $WS_TABSTOP, $WS_CLIPCHILDREN),0, 0, 500, 500,$t)
$file = FileOpen("test.htm", 2)
FileWrite($file, '<html><body><h1>Html Test</h1><a href="test">Link</a></body></html>')
FileClose($file)
$result2 = DllCall($dll, "BOOL", "HTMLayoutLoadFile","HWND",$r,"wstr","test.htm")
GUISetState(@SW_SHOW,$r)
While 1
$GUIMsg = GUIGetMsg()
Switch $GUIMsg
Case $GUI_EVENT_CLOSE
FileDelete("test.htm")
ExitLoop
EndSwitch
WEnd
Func WM_NOTIFY($hWnd, $Msg, $wParam, $lParam)
;$tagNMHDR = "hwnd hWndFrom;uint_ptr IDFrom;INT Code"
Local $nmhdr = DllStructCreate($tagNMHDR, $lParam)
Local $iCode = DllStructGetData($nmhdr, "Code")
If $icode = 2817 Then
ConsoleWrite("Data loaded"&@CRLF)
EndIf
EndFunc ;==>WM_NOTIFY
Je n'arrive pas a faire fonctionner les events, j'aimerai pouvoir exécuter du code autoit en réponse au clicks sur les élément html.
Pour avoir un aperçu des capacités de htmLayout lancer browse.exe du répertoire bin du sdk et ouvrez un htm contenu dans html_samples.
Si un Pro des DLL pouvait faire une UDF, ca serai génial. (Rémunération possible)
Merci d'avance.