On Apr 16, 2006, at 1:00 PM, realbasic-nug- [EMAIL PROTECTED] wrote:
Don't know if it has been answered yet but the true window of a container control can be accessed by containerControl.Handle. Of course this will not give you a "window", but a WindowRef or HWND. Then you need a search function to map the handle to the window. This should work (it does so in plugins)
This is wrong, however, what is not wrong and does indeed work is the following:
Right-click (option-click) on the ContainerControl and choose the generic RectControl. This is the base, as you know, of all RectControls, including Plugin controls. In the CreatePane event you can inquire about me.window and me.window is the true window. In the Open event you can also inquire about me.window but that will be the ContainerControl.
So by creating a generic RectControl on the ContainerControl, you can obtain the reference to the true window as well as the containerControl.
This might be a hack, but all controls rely on this behavior, given also that plugin developers usually inquire about the true window in the so called Open Callback behavior function, which is not different from the CreatePane event of the RectControl. Because every control implements the CreatePane, it'll never show up in subclassed controls.
Alfred _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
