Solved

CWinApp. Idle process time without hang the CPU.

Posted on 1998-11-10
1
353 Views
Last Modified: 2013-11-20
I have a CWinApp object attached to a CDialog:
my_CDlg_ptr=new my_CDlg;
m_pMainWnd=(CWnd*)my_CDlg_ptr;
My app needs to do things all the time, so I overload CWinApp::OnIdle(), to do such things. The point is: if I retrurn CWinApp::OnIdle(), the function is called only one time, and If I return TRUE, the CPU Usage in TaskManager is 100% all the time.
What can I do, to give my app. Idle process time, without hang the cpu?
0
Comment
Question by:wau
1 Comment
 
LVL 2

Accepted Solution

by:
cyrilbdt earned 50 total points
ID: 1324473
better create another thread and there "do things all the time" or create timer and catch WM_TIMER message

hope this helps
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
bobThere java chalenge 45 95
format the code in java 6 109
Change to event 1 127
unix example issues 18 106
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question