Code: Select all
wxBusyCursor busy;
for (int i=0; i<5000; i++)
{
wxSleep(2);
wxSafeYield();
}
In this code, if I take out wxSafeYield(), the mouse pointer changes to an hourglass. If I leave it as it is, the mouse pointer does not change..
Why is that? Is there a way to have both?
Is this even safe to do -calling wxSafeYield() inside a for loop?
By the way, replacing wxSafeYield() with wxYield() does work, but I don't want to use it since it doesn't disable the windows.