comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: VTK + IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: VTK + IDL [message #40797 is a reply to message #40652] Wed, 25 August 2004 13:31 Go to previous messageGo to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
Karl Schultz wrote:

> "Rick Towler" wrote in message
>
>> Karl Schultz wrote:
>>
>>> You would need two things for this -
>>>
>>> 1) A way to get an OS-level window ID for the window that IDL created
>>> 2) A way to pass this window ID to VTK and tell it to use it
>>>
>>> I am pretty sure that (1) does not exist

>> To Karl's point, (1) exists in the win32 api. The GetActiveWindow()
>> function will return (you guessed it) a handle to the active window. If
>> you write your IDL code such that you call this function in your .dlm
>> right after the window is realized then you're pretty safe. I use this
>> in my directInput .dlm.
>
>
> Neat. I was actually going to mumble-post something about using X11 calls
> to root around in the X window tree, looking for the drawing window, but
> then couldn't think of the equivalent sort of thing for Windows. Do you
> call the dlm from an event handler for something like an expose event? It
> seems like you would stand a better chance of getting the right window if
> so.

Since the handle won't change over the lifetime of the window I find it
easier to grab it right after the base is realized. Then there aren't
any wasted calls when multiple expose events are triggered.

I suppose I could automate things by writing it as a stub widget and
grabbing the handle during a "realize" callback but aside from the fun
of doing it, it isn't worth it.

-Rick
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: save an IDLanROI to file? (newbie question)
Next Topic: TVimage and PlotS

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 08:15:17 PDT 2025

Total time taken to generate the page: 0.32163 seconds