Link to home
Start Free TrialLog in
Avatar of elrond
elrond

asked on

OnIdle() doesn't work

I've a problem with the CApp::OnIdle()-routine:

In my SDI-App I installed an OnIdle() that works perfectly. Now I want to show a fullscreen-animation after a button is pushed and I want to use the OnIdle -routine to check for updating the (full) screen (20Hz or so). Therefore I create a new Wnd (with WS_POPUP|WS_MAXIMIZE|WS_VISIBLE style and all the stuff) and draw a bitmap to it. That's ok. But from then on my OnIdle() won't be called unless I move the mouse or press a key. As far as I found out this behaviour depends on the size of the created Wnd. If the mouse isn't in the client-area of the new Wnd during the creation, OnIdle is called. But only as long as I don't move the mouse(!) (no matter if inside or outside the new Wnd). Keypressing is ok.

Has anyone an idea of how to work around that?

Thanks
Elrond
ASKER CERTIFIED SOLUTION
Avatar of Tommy Hui
Tommy Hui

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of elrond
elrond

ASKER

Excellent! I returned CWinApp::OnIdle(lCount)
as suggested by the class-wizzard. (Another example of "You better don't rely on things like class-wizzard if you haven't coded the stuff by hand yet and know exactly what's going on".)

Thanks
elrond


Avatar of elrond

ASKER

Excellent! I returned CWinApp::OnIdle(lCount)
as suggested by the class-wizzard. (Another example of "You better don't rely on things like class-wizzard if you haven't coded the stuff by hand yet and know exactly what's going on".)
btw OnTimer is too slow for animations....

Thanks
elrond