OnIdle is not activated
Vadim Zeitlin
vadim at wxwidgets.org
Mon Jul 2 03:53:35 PDT 2007
On Mon, 2 Jul 2007 17:28:53 +0900 ABE Hiroshi <hiroshi.abe at na-net.ornl.gov> wrote:
AH> It seems OnIdle is rarely called on my Windows env.
It's called every time there are no _more_ messages to process in the
queue. The "more" is important, i.e. the idle event is generated only when
the queue becomes empty, not while it remains empty. To get a continuous
stream of idle events, you need to call event.RequestMore() in your
EVT_IDLE handler. Of course, this means that your program will consume 100%
of the CPU time so this is not usually recommended.
Finally, this behaviour should be the same under all platforms. If it's
different under Mac, it's a bug in wxMac.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list