Solved

CWinApp. Idle process time without hang the CPU.

Posted on 1998-11-10
1
354 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Add content to output file 4 72
Generic progress indicator 6 121
Process filename extension 3 218
Shell script to login to remote m/c and execute commands 10 81
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…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.

710 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