# Hooking up wxRuby in other applications

**URL:** <https://www.ruby-forum.com/t/hooking-up-wxruby-in-other-applications/122108>\
**Category:** wxRuby\
**Created:** [December 4, 2007, 5:31pm UTC](https://www.ruby-forum.com/t/hooking-up-wxruby-in-other-applications/122108 "2007-12-04T17:31:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jari\_W](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a698b9/32.png) [@Jari\_W](https://www.ruby-forum.com/u/Jari_W)\
**Post date:** [December 4, 2007, 5:31pm UTC](https://www.ruby-forum.com/t/hooking-up-wxruby-in-other-applications/122108/1 "2007-12-04T17:31:13Z")

</div>

Is there a way (class?) to be able to use wxRuby for subwindows in a  
host application? (Windows and OSX platforms)

Best regards,

Jari W.

---

<div class="post-metadata">

**Author:** ![Jari\_W](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a698b9/32.png) [@Jari\_W](https://www.ruby-forum.com/u/Jari_W)\
**Post date:** [December 4, 2007, 5:40pm UTC](https://www.ruby-forum.com/t/hooking-up-wxruby-in-other-applications/122108/2 "2007-12-04T17:40:03Z")

</div>

Hi Jari

Jari W. wrote:

> Is there a way (class?) to be able to use wxRuby for subwindows in a  
> host application? (Windows and OSX platforms)

Not exactly, so far as I know.

You can get a platform-native handle for a Wx::Window (such as a host  
frame) by using Window#get\_handle. I guess it should be possible to use  
this to directly interact with the native OS using Win32API or  
RubyCocoa. If it were possible to host the application in wxRuby, and  
then pass a handle to an external app to draw upon, it might work.

This is done regularly in C++ wxWidgets but I’ve never seen it tried in  
wxRuby. Yet 😉

best  
alex
