[wxruby-users] How to get a Window handle from another app?

Alex Fenton alex at pressure.to
Tue Jan 15 06:55:50 EST 2008


Hi

Ellis, Peter wrote:
>
> I would like to get a window handle from another app outside of wxRuby 
> and convert it into a wxRuby Window handle so that I can use it as the 
> parent Window for several wxRuby child windows.  Basically I want to 
> use the FRAME_FLOAT_ON_PARENT window style so that my wxRuby windows 
> become associated with the outside app kind of like toolbars, e.g., 
> they don't show up in the taskbar and are always floating on top of my 
> target app.
>
[plain text is preferred on this list, please]

This reference from C++ wxWidgets and a few others seem to suggest a 
HWND window identifier can be linked to a Wx::Window using the
AssociateHandle method call:
http://www.wxwidgets.org/wiki/index.php/WxWidgets_For_MFC_Programmers#Associating_HWNDs_with_wxWindow_instances

However, although the AssociateHandle call is listed in the headers, 
it's not listed in the wxWidgets documentation. So at present it's not 
available in wxRuby. I will see if it's possible to add this call for 
the next release.

alex



More information about the wxruby-users mailing list