Multiple Graphics windows

BlitzMax Forums/BlitzMax Programming/Multiple Graphics windows

Hezkore(Posted 2010) [#1]
Is there any way to create another window?
I want something like
Graphics(800,600)
Graphics2(320,240)
I'd also have to be able to select which window to draw to...
Also, this has to be done without MaxGUI.

Last edited 2010


rs22(Posted 2010) [#2]
Hi,

I'm not sure of the best way to do this, but this seems to work okay:



I don't know how you would determine which window receives events, though. Hope this helps!


Hezkore(Posted 2010) [#3]
Wow thanks rs22!! :D
That was much easier then I first expected.
Any way of hiding the second window in the taskbar?


shinkiro1(Posted 2010) [#4]
I guess you would have to use the WinApi for this.
When using OpenGL be sure to call
GLShareContexts()

before creating a graphics object.


Hezkore(Posted 2010) [#5]
Yeah I've been looking for a function like that in the WinAPI but I haven't managed to find one yet. :S
It does however work if you make the window a tool window...

Last edited 2010


rs22(Posted 2010) [#6]
According to http://msdn.microsoft.com/en-us/magazine/cc301403.aspx:

...you must create your dialog as a child of an invisible window that has WS_EX_TOOLWINDOW set, and you must make sure your dialog has the WS_EX_APPWINDOW style turned off.