Hummm replying to my own post:)

windows it manipulates. Is it possible to attach to a window/control
created by some other application? Say I have a handle of a main window of
Windows calculator. How do I turn it into Win::GUI object?

Interesting question. As a quick/dirty answer, yes it could be possible. The basic problem is that when Win::GUI object's are destroyed the underlying window handle is also "destroyed".This could be solved by having some sort of flag to say if Win::GUI actually owns the object or not.

Ok - the above is true when we're using objects via method calls but most of the internals can also be called as functions. For example:

$win->Show(); #shows the window

but we could also call it this way:

Win32::GUI::Show($win);

Where $win is a Win32::GUI object OR the handle...So, if you've got a handle for some other app, then it should just work...

Hope that makes some sense.

Cheers,

jez.



Reply via email to