Click here to Skip to main content
15,925,895 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem compiling Templates in VC++7.0 .NET [modified] Pin
jonnyvargazz23-Apr-08 4:15
jonnyvargazz23-Apr-08 4:15 
GeneralRe: Problem compiling Templates in VC++7.0 .NET Pin
Saurabh.Garg23-Apr-08 15:09
Saurabh.Garg23-Apr-08 15:09 
GeneralRe: Problem compiling Templates in VC++7.0 .NET Pin
jonnyvargazz23-Apr-08 21:35
jonnyvargazz23-Apr-08 21:35 
GeneralRe: Problem compiling Templates in VC++7.0 .NET Pin
Saurabh.Garg24-Apr-08 2:06
Saurabh.Garg24-Apr-08 2:06 
GeneralRe: Problem compiling Templates in VC++7.0 .NET Pin
jonnyvargazz24-Apr-08 3:57
jonnyvargazz24-Apr-08 3:57 
GeneralRe: Problem compiling Templates in VC++7.0 .NET Pin
Saurabh.Garg24-Apr-08 4:05
Saurabh.Garg24-Apr-08 4:05 
GeneralRe: Problem compiling Templates in VC++7.0 .NET Pin
jonnyvargazz24-Apr-08 4:15
jonnyvargazz24-Apr-08 4:15 
GeneralWin32 message loop and CPU usage Pin
Hanan88823-Apr-08 0:58
Hanan88823-Apr-08 0:58 
I'm developing an animated game on Win32.

my message-loop looks like this:
MSG msg;
ZeroMemory( &msg, sizeof(msg) );
while( msg.message!=WM_QUIT )
{
    if( PeekMessage( &msg, NULL, 0U, 0U, PM_REMOVE ) )
    {
        TranslateMessage( &msg );
        DispatchMessage( &msg );
    }
    else //"idle" state. Call graphic rendering functions. Not that they are simple and speedy.
    {
	CPTWindowManager::GetInstance()->RenderAllGames();
    }
}

I have noticed that takes 50% of the CPU.
I wonder if this 50% are "for real". If so, it is not desirable.

I tried to use GetMessage() but I don't know how to figure out the "idle" state when using GetMessage().

Note that the rendering stuff are relatively simple rendering and thus the time they take is unnoticeable.
GeneralRe: Win32 message loop and CPU usage Pin
Cedric Moonen23-Apr-08 1:08
Cedric Moonen23-Apr-08 1:08 
GeneralRe: Win32 message loop and CPU usage Pin
Hanan88823-Apr-08 1:18
Hanan88823-Apr-08 1:18 
GeneralRe: Win32 message loop and CPU usage Pin
Cedric Moonen23-Apr-08 2:16
Cedric Moonen23-Apr-08 2:16 
GeneralRe: Win32 message loop and CPU usage Pin
Hanan88823-Apr-08 2:22
Hanan88823-Apr-08 2:22 
Generalneed help for socket client application Pin
amit_pansuria23-Apr-08 0:37
amit_pansuria23-Apr-08 0:37 
GeneralRe: need help for socket client application Pin
CPallini23-Apr-08 0:55
mveCPallini23-Apr-08 0:55 
QuestionAny tool to make such an install file? Pin
followait23-Apr-08 0:17
followait23-Apr-08 0:17 
AnswerRe: Any tool to make such an install file? Pin
Hanan88823-Apr-08 1:02
Hanan88823-Apr-08 1:02 
AnswerRe: Any tool to make such an install file? Pin
Rajesh R Subramanian23-Apr-08 1:32
professionalRajesh R Subramanian23-Apr-08 1:32 
GeneralRe: Any tool to make such an install file? Pin
followait23-Apr-08 3:02
followait23-Apr-08 3:02 
General[Message Deleted] Pin
neha.agarwal2723-Apr-08 0:01
neha.agarwal2723-Apr-08 0:01 
GeneralRe: Converting LPCSTR to CString Pin
Naveen23-Apr-08 0:08
Naveen23-Apr-08 0:08 
AnswerRe: Converting LPCSTR to CString PinPopular
Rajesh R Subramanian23-Apr-08 0:14
professionalRajesh R Subramanian23-Apr-08 0:14 
General[Message Deleted] Pin
neha.agarwal2723-Apr-08 0:45
neha.agarwal2723-Apr-08 0:45 
AnswerRe: Converting LPCSTR to CString Pin
Rajesh R Subramanian23-Apr-08 0:58
professionalRajesh R Subramanian23-Apr-08 0:58 
General[Message Deleted] Pin
neha.agarwal2723-Apr-08 1:01
neha.agarwal2723-Apr-08 1:01 
GeneralRe: Converting LPCSTR to CString Pin
Rajesh R Subramanian23-Apr-08 1:06
professionalRajesh R Subramanian23-Apr-08 1:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.