@AngelDaniel : I tried your method but I don't think I can hook while the window is being resized. I tried a hook that's based on a timer. If you try and resize the window you'll see what I mean.
It's certainly doing it quickly enough, but unfortunately it only does it after the resize has been completed.
Any other ideas?
Const TICK_EVENT:Int=69 Function MyHook:Object( id:Int,data:Object,context:Object ) Local ev:TEvent=TEvent(data) Select ev.id Case EVENT_WINDOWCLOSE End Case TICK_EVENT SetGadgetShape win,0,0,640,480 End Select Return Data End Function Local MY_EVENT:TEvent=CreateEvent(TICK_EVENT) Local myTimer:TTImer = CreateTimer(10,MY_EVENT) AddHook EmitEventHook,MyHook Global win:TGadget win=CreateWindow( "A window!",0,0,640,480, Null, WINDOW_TITLEBAR | WINDOW_RESIZABLE ) Global Canvas:Tgadget=CreateCanvas(0,0,640,480,Win) While True WaitEvent Wend
It's certainly doing it quickly enough, but unfortunately it only does it after the resize has been completed.
Any other ideas?