Virgilio1 Posted February 11, 2012 Share Posted February 11, 2012 hi friends I'm not very expert, I would use the dll qhtm to view reports in reformat html. I tried to write this script but it does not work, you help me? #include-once #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> #include <UDFGlobalID.au3> #include <StructureConstants.au3> Global const $QHTM_CLASSNAME = "QHTM_Window_Class_001" Global $MODULEID Func _GUIqthm_Create($hwnd, $iX, $iY, $iWidth = 150, $iHeight = 150, $iStyle =0x0000000F, $iExStyle = 0x00000000) Local $hCtrl, $nCtrlID Local $hLib = DllOpen(@ScriptDir & "\qhtm.dll") If Not IsHWnd($hwnd) Then _WinAPI_ShowError("Invalid Window handle for _GUIqtm_Create 1st parameter") QHTM_Init() $iStyle = BitOR($WS_CHILD, $WS_VISIBLE, $WS_CLIPCHILDREN) $hCtrl = _WinAPI_CreateWindowEx(0,$QHTM_CLASSNAME,"",$iStyle,$iX, $iY, $iWidth, $iHeight, $hwnd,0,0) if $hCtrl = 0 Then msgbox(128,"Errore","Errore nella creazione del Controllo") Return False Else Return $hCtrl EndIf endFunc Func QHTM_Init( $DllPath="qhtm.dll" ) $MODULEID = DllOpen($DllPath) if $MODULEID = -1 then MsgBox(128,"Errore","Non ho caricato la dll") if DllCall($MODULEID,"int","QHTM_Initialize", 0) <> 0 Then MsgBox(128,"Errore","Non Inizializzo 1") if DllCall($MODULEID,"int","QHTM_EnableCooltips", 0)<> 0 Then MsgBox(128,"Errore","Non Inizializzo 2") EndFunc and this code for testing #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include "qhtm.au3" #Region ### START Koda GUI section ### Form= local $Form1 = GUICreate("Form1", 615, 438, 230, 157) local $Button1 = GUICtrlCreateButton("Button1", 464, 400, 75, 25) local $Qhtm = _GUIqthm_Create($Form1, 8, 16, 593, 361) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
Virgilio1 Posted February 11, 2012 Author Share Posted February 11, 2012 (edited) I solved using the htmlayout.dll and relative AU3 Edited February 11, 2012 by Virgilio1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now