Jump to content

Destinator GUI


turchino
 Share

Recommended Posts

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:

post-19071-1166347504_thumb.jpg

Posted Image

Posted Image

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

Wend

GUIDelete ()

Exit

While 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 Long

Return Value

[C++]

Returns S_OK on success or an error HRESULT on failure.

[Visual Basic]

Long value represents CommandResult.

Parameters

Flag

[in] Specifies the style of the Destinator window being created.

CommandResult

[out, retval] specifies result of function call.

Remarks

By 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.

Examples

Creating 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 by turchino
Link to comment
Share on other sites

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 by quaizywabbit
[u]Do more with pre-existing apps![/u]ANYGUIv2.8
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...