WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Dialog Editor
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Invisible Display


Question:

Why use Display with negative timeout value to display an invisible message?

Answer:

TimeDelay just delays for a time. Display puts up a new window, tells that window to delay for a while, and waits until the window is done delaying. A much more complex version of TimeDelay that invokes (huge - relatively) chunks of code.

If someone is trying to hack an MSIE window into a dialog, and then in a dialog callback procedure tell the hacked-in window to automatically scroll down. But because the code is currently running within a dialog callback, WinBatch message processing hits a standstill waiting for the callback to return, and the scroll down command either gets delayed or simply lost in the shuffle.

It was found that doing a Display or Message function allowed this scrolling of the hacked in control to work properly. But obvious message, since it totally halts processing until it is responded to was not a favorite choice. Display was better, but it did pop up the display message of course, and was distracting. So, using a simple hack that *may* be removed before the end of beta, passing a negative time to the display function causes it to display the display message invisibly. The theory is that whatever un did the jam for the scrolling problem would also be undone by the hidden display box. It is not very likely than the hidden display would have much use outside of dialog callback functions dealing with non-WinBatch window controls hacked into a Windows dialog that was being sent OLE commands and needed a lot of message traffic to occur. Documentation for this feature is likely to be sketchy at best.


Article ID:   W16913
File Created: 2007:07:03:14:27:02
Last Updated: 2007:07:03:14:27:02