Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » CWinApp::OnIdle() not being called Collapse All
Subject Author Date
Neville Franks Nov 27, 2003 - 5:31 PM

I have a problem where CWinApp::OnIdle() and hence my CMyApp::OnIdle() isn’t being called when the mouse is over a docked window, the statusbar, or any menubar or toolbar. If I unpin the docked window so that it can autohide then OnIdle() is called correctly. This is without it hiding. It is also called correctly when the mouse is over my View window.

I can’t see that this problem is peculiar to my code, however I haven’t tried overiding OnIdle() in any of the sample apps.

Technical Support Dec 1, 2003 - 12:27 AM

Dear Neville,

We tried and analyzed the problem you reported by adding the following method to CWinApp derived classes in different Prof-UIS samples. In all cases this method works as it should. If you let us take a look at your source code, we will try to clarify the cause of the problem.

	virtual BOOL OnIdle( LONG lCount )
	{
		TRACE1( "  --> OnIdle( %ld )\n", lCount );
		return TRUE;
	}

Neville Franks Dec 10, 2003 - 2:47 PM

I tried this on the ProfStudio sample and it appears to work ok. My app has a view derived from CHtmlView. Maybe this is related to the problem. If I can provide any more information I will.

Technical Support Dec 11, 2003 - 2:36 AM

Dear Neville,

We would suggest to trace your app’s messages with SPY++. Maybe a control inside your HTML view has an activated timer, which leads to the situation when the message queue is always not empty. If it is the point, CWinApp::OnIdle() should not be called.