wxScrolledWindow on a TGadget

BlitzMax Forums/Brucey's Modules/wxScrolledWindow on a TGadget

FreakForFreedom(Posted 2008) [#1]
wanted to ask if there is a way to create a wxScrolledWindow on a TGadget-Window, which has been created via CreateWindow with MaxGui


Brucey(Posted 2008) [#2]
There might be a way to do it, but it won't be cross-platform.

You might be able to create a "fake" wxWindow, on which you call SetHWND() and give it the handle of the MaxGUI window.
This then would be your parent wxWindow onto which you create your "real" wxScrolledWindow().

SetHWND is not currently exposed in the BlitzMax API, but appears in the win32 includes :
    void SetHWND(WXHWND hWnd) { m_hWnd = hWnd; }


Of course, this is pure theory, as I haven't had time to try anything out yet, but it may work...

You would also have to remember that wxMax still needs to be initialized in the normal way for all the usual event handling to work properly.


FreakForFreedom(Posted 2008) [#3]
hmm, seems to be hard to make this.

What I really want to make is to use the module wxDC on a TGadget.
Is there amaybe a easier way to make this?


Brucey(Posted 2008) [#4]
It might be easier to implement your own GDI code for MaxGUI than to try to join two very different systems together.

But you never know, it might be possible to make it work the way you want.
You could always ask on the wxWidgets forums if anyone has experience of mixing wx controls with OS controls. If there is some example code, then it should be relatively easy to port that for BlitzMax.