If I drag a window.. timers stop?

BlitzMax Forums/BlitzMax Programming/If I drag a window.. timers stop?

Gabriel(Posted 2006) [#1]
Title says it really. If I drag a GUI window around, while I'm dragging it, nothing happens. Now I can understand some events not being recognised, sure, but a timer? BlitzMax is fairly powerful, but I've yet to see any evidence it can stop time. Is there a solution/fix/workaround to this behaviour? An event I have to catch, perhaps?


skidracer(Posted 2006) [#2]
You need to use an eventhook as Windows goes into a "modal loop" when the window is being dragged (it can do callbacks but can't allow your main loop to execute).


REDi(Posted 2006) [#3]



Gabriel(Posted 2006) [#4]
Hi,

Thanks for the example, but that doesn't work for me. Once the window starts being dragged, the canvas stops being updated.


TeaVirus(Posted 2006) [#5]
Gabriel,
There is an example of this in the MaxGUI tutorial in the "Tutorials and articles" section of the docs.


Gabriel(Posted 2006) [#6]
So there is. That example won't compile as-is, unfortunately ( apparently SetTarget is not a valid method for windows any more ) and with those lines commented out, it kinda works. There is a very long pause after you click and drag before the eventhooking kicks in, and if you press any of the minimize or maximize buttons it breaks down altogether and stops again. But it's a bit better, I suppose.

EDIT: It doesn't work when integrated into my project though. It may work for simple stuff, but that seems to be all.