How to spend idle time in a dialog? 
Author Message
 How to spend idle time in a dialog?

Hi all,

I like to do some special updates in a dialog during idle time.
The application object has on OnIdle() function, but a CDialog
seems not to have it. I could call a CDialog function from the
OnIdle() in the application, but I think the message loop doesn't
run when the CDialog (modal) is running. And thus the OnIdle()
of the application isn't called.

So, how can I spend idle time in a dialog?

Any help is welcome. Thank you very much, Cor Jansen.



Tue, 04 Dec 2001 03:00:00 GMT  
 How to spend idle time in a dialog?

Handle the WM_KICKIDLE message. It is not available in Class wizard so
you'll have to program it manually:

in .h file:
afx_msg void OnKickIdle(UINT nWhy, LONG nCount);

in .cpp file:
BEGIN_MESSAGE_MAP(CIdlePropSheet, CPropertySheet)
 //{{AFX_MSG_MAP(CIdlePropSheet)

 //}}AFX_MSG_MAP
 ON_MESSAGE(WM_KICKIDLE, OnKickIdle)
END_MESSAGE_MAP()

void CMyDialog::OnKickIdle(UINT nWhy, LONG nCount)
{
    //Your code here

Quote:
}

>Hi all,

>I like to do some special updates in a dialog during idle time.
>The application object has on OnIdle() function, but a CDialog
>seems not to have it. I could call a CDialog function from the
>OnIdle() in the application, but I think the message loop doesn't
>run when the CDialog (modal) is running. And thus the OnIdle()
>of the application isn't called.

>So, how can I spend idle time in a dialog?

>Any help is welcome. Thank you very much, Cor Jansen.



Tue, 04 Dec 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ??showing Idle time in a dialog-based API

2. How to obtain the login time and the idle time of the user

3. how to obtain the login time and the idle time of the users

4. STL app spends 25% of time in operator delete(void*)

5. Statements time spent

6. time spent on memory allocation

7. where the program spends its time

8. How to get system idle time or get notified after the system being idle for an extended time

9. How to get system idle time or get notified after the system being idle for an extended time

10. System Idle time

11. Idle Times

12. Get Total Idle Time

 

 
Powered by phpBB® Forum Software