I have a problem.
I am writing a DLL that controls a properties window for the main application. When the properties window is open, the user can still click and select things in the main window.
The problem is that string gadget text only gets updated if you use a WaitWindowEvent() command. However, if you use this command, it will freeze the program when you are trying to click on things in the main window. There doesn't seem to be any event for when you change the focus, so even though the properties window is not the active window, it still hangs until another event occurs.
The logical thing to do would be to use a WindowEvent() loop instead of WaitWindowEvent(). However, the string gadgets are totally unresponsive under these conditions.
StringGadget updating dependant on WaitWindowEvent()
Re: StringGadget updating dependant on WaitWindowEvent()
> The logical thing to do would be to use a WindowEvent() loop instead of
> WaitWindowEvent(). However, the string gadgets are totally unresponsive
> under these conditions.
Without seeing your code, this may be due to the CPU being 100% used
during the WindowEvent() loop. Try sticking Delay(1) in the loop like so:
> WaitWindowEvent(). However, the string gadgets are totally unresponsive
> under these conditions.
Without seeing your code, this may be due to the CPU being 100% used
during the WindowEvent() loop. Try sticking Delay(1) in the loop like so:
Code: Select all
ev=WindowEvent() : if ev=0 : Delay(1) : EndIf ; Release CPU when app is idle.

