turchino Posted December 17, 2006 Posted December 17, 2006 (edited) Hi all,I'm a newbie on the AutoIT world.I'm trying to create a GUI embedding the Destinator window (using SDK)I could only show the window but it's not sticked to the GUI (and therefore GUI not usable until you close the opened window manually first)This what I've got from the OLE Viewer:And code I've wrote:CODE#include <GUIConstants.au3>#include <ANYGUIv2.6.au3>$DWin = ObjCreate("DestSDK.Dest")GUICreate ("Test Screen", 640, 480, 300,300,$WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)$TestGui = GUICtrlCreateObj ($DWIN.CreateDestinatorWindow(32),10,10,250,250)GUISetState()While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE then ExitLoop Endif WendGUIDelete ()ExitWhile the usage of CreateDestinatorWindow is described down here:Creates the Destinator window and the full set of Destinator engines. [C++]HRESULT CreateDestinatorWindow( long Flag, long * CommandResult);[Visual Basic]Function CreateDestinatorWindow(Flag as Long) as LongReturn Value[C++]Returns S_OK on success or an error HRESULT on failure.[Visual Basic]Long value represents CommandResult.ParametersFlag[in] Specifies the style of the Destinator window being created. CommandResult[out, retval] specifies result of function call. RemarksBy default the window is invisible. This method also specifies the style of Destinator window. The window (and so on all engines) must be destroyed by calling DestroyDestinatorWindow method.ExamplesCreating Destinator window:[C++]bool CreateDestinatorWindow() { long lFlag = F_DEFAULT; long lResult = -1; HRESULT hr = pIDest->CreateDestinatorWindow(lFlag, &lResult); return (SUCCEEDED(hr) && (lResult == API_COMMAND_IS_DONE));}Specifies mask of destinator window creation properties. You can combine values from this enum to determine set of properties.And the flags: (only flag 32 seems working, the others give me a blank interface with Windows wait clock)F_DEFAULT = 0 Creates default desinator window. F_NOCONTROLS = 1 Creates destinator window without controls. F_NOCAPTION = 2 Creates destinator window without caption. F_NOSYSMENU = 4 Creates destinator window without system menu. F_SHOW_ABOUT_DLG = 8 Shows about dialog. F_SHOW_EXIT_DLG = 16 Shows exit dialog. F_MODAL_DLG = 32 Creates destinator window as modal dialog. F_FULLSCREEN = 64 Creates destinator window in full screen mode. I'll be very grateful if someone can show how to attach this to the GUI so I can control it by adding some buttons etc.Many thanks Edited December 17, 2006 by turchino
quaizywabbit Posted December 17, 2006 Posted December 17, 2006 (edited) Use _TargetaddObj() in ANYGUI It was commented out previously so as not to throw errors with the production version of Autoit. the last parameter in that function lets you specify the window handle you want the object embedded into. EDIT: #include <GUIConstants.au3> #include <ANYGUIv2.6.au3> $DWin = ObjCreate("DestSDK.Dest") $mywindow = GUICreate ("Test Screen", 640, 480, 300,300,$WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $TestGui = _TargetaddObj(($DWIN.CreateDestinatorWindow(32)),10,10,250,250, $mywindow) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE then ExitLoop Endif Wend GUIDelete () Exit Don't know anything about that object, but the above might get you going in the right direction Edited December 17, 2006 by quaizywabbit [u]Do more with pre-existing apps![/u]ANYGUIv2.8
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