Is there a way to run a graphics window within a window created by MaxGUI... OR... to use the MaxGui gadgets (button/textfield/etc) within a graphics window? I didn't see anything like this in the docs.
Graphics window within MaxGUI
BlitzMax Forums/BlitzMax Programming/Graphics window within MaxGUI You need to CreateCanvas() then call CanvasGraphics() to get a TGraphics object to that canvas, then you can SetGraphics().
Hope that helps
Hope that helps
SuperStrict Local MainWindow:TGadget Local MainCanvas:TGadget MainWindow = CreateWindow("MyWindow",100,100,800,600,0,WINDOW_TITLEBAR|WINDOW_MENU|WINDOW_STATUS) MainCanvas = CreateCanvas(0,0,800,600,MainWindow) While WaitEvent() Select EventID() Case EVENT_WINDOWCLOSE FreeGadget MainCanvas End End Select Wend
Thanks... I'll try this when I get home from work.
SuperStrict Local MainWindow:TGadget = CreateWindow("MyWindow",100,100,800,600,Null,WINDOW_TITLEBAR|WINDOW_MENU|WINDOW_STATUS) Local MainCanvas:TGadget = CreateCanvas(0,0,800,600,MainWindow) SetGraphics(CanvasGraphics(MainCanvas)) While WaitEvent() Select EventID() Case EVENT_WINDOWCLOSE FreeGadget MainCanvas End End Select Cls DrawRect(50, 50, 50, 50) Flip Wend