Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CWinApp::OnIdle
CWinApp                                     Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  virtual BOOL OnIdle( LONG lCount );
 
  Parameter   Description
 
  <lCount>    A counter incremented each time GetMessage finds the message
              queue empty. This count is reset to 0 each time a new
              message is processed. <lCount> can be used to determine
              relatively how long the application has been idling without
              processing a message.
 
  Remarks
 
  Override this member function to perform idle-time processing. OnIdle is
  called when the application's message queue is empty. Use your override
  to call your own idle-handler members for such tasks as background
  recalculation in a spreadsheet, background repagination in a word
  processor, file backup, and the like.
 
  The <lCount> parameter is incremented each time GetMessage finds the
  queue empty and reset to 0 each time a new message is processed. You can
  call your different idle routines based on this count.
 
  Do not perform lengthy tasks during OnIdle because your application
  cannot process user input until OnIdle returns.
 
  NOTE: The default implementation of OnIdle performs internal data
        structure cleanup. Therefore, if you override OnIdle, you must
        explicitly call CWinApp::OnIdle in your overridden version to get
        the default processing.
 
  Return Value
 
  TRUE to receive more idle processing time; FALSE if no more idle time is
  needed.
 
 
                                     -♦-