Solved

CWinApp. Idle process time without hang the CPU.

Posted on 1998-11-10
1
350 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
notReplace  challenge 53 125
format the code in java 6 93
haveThree challenge 22 116
abstract class with all non abstract mentods 6 76
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

808 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