stuartc1 Posted May 27, 2005 Share Posted May 27, 2005 Hi, Thanks to everyone who has helped with my previous posts.... im a newbie to autoit so excuse all my questions. I have a GUI form with 4 tabs - everything on the GUI is within these tabs. I want to add a new tab and embed cwebpage.dll to it. I attemped to do this but the dll loads in the background behind all the tabs. Is this an error on my part or is it not possible to load dll elements within tabs? If this is not possible - is there a way to have a button which opens an extended form with the dll in it? for example on windows some problems have a button like 'more>' which when clicked opens a new part to the existing form (a another kind of hidden element). (sorry I dont think I explained that to well). Stuart Link to comment Share on other sites More sharing options...
Lazycat Posted June 1, 2005 Share Posted June 1, 2005 It's possible. Try this code: #include <GUIConstants.au3> Global $cweb = DLLOpen(@ScriptDir & "\cwebpage.dll") If $cweb = -1 Then Exit $hGUI = GUICreate("GUI", 200, 200) GUICtrlCreateTab(5, 5) GUICtrlCreateTabItem("Tab1") $holder1 = GUICtrlCreateLabel("", 10, 35, 100, 100) $holder1hwnd = ControlGetHandle($hGUI, "", $holder1) GUICtrlCreateTabItem("Tab2") GUICtrlCreateTabItem("") DLLCall($cweb, "long","EmbedBrowserObject", "hwnd", $holder1hwnd) DLLCall($cweb, "long", "DisplayHTMLStr", "hwnd", $holder1hwnd, "str", "Have a nice day!") GUISetState() While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Func OnAutoitExit() DLLCall($cweb, "long", "UnEmbedBrowserObject", "hwnd", $holder1hwnd) DLLClose($cweb) EndFunc Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
stuartc1 Posted June 8, 2005 Author Share Posted June 8, 2005 Thanks Lazycat.. Thanks works perfectly 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