Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

CWinApp. Idle process time without hang the CPU.

Posted on 1998-11-10
1
Medium Priority
?
361 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 150 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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .

824 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