Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 1.23 KB

onidle-member-function.md

File metadata and controls

22 lines (16 loc) · 1.23 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: OnIdle Member Function
OnIdle Member Function
11/19/2018
OnIdle
processing messages [MFC]
OnIdle method [MFC]
idle loop processing [MFC]
CWinApp class [MFC], OnIdle method [MFC]
message handling [MFC], OnIdle method [MFC]
51adc874-0075-4f76-be1c-79283f46c10b

OnIdle Member Function

When no Windows messages are being processed, the framework calls the CWinApp member function OnIdle (described in the MFC Library Reference).

Override OnIdle to perform background tasks. The default version updates the state of user-interface objects such as toolbar buttons and performs cleanup of temporary objects created by the framework in the course of its operations. The following figure illustrates how the message loop calls OnIdle when there are no messages in the queue.

Message loop process.
The Message Loop

For more information about what you can do in the idle loop, see Idle Loop Processing.

See also

CWinApp: The Application Class