CPU Usage. - Programmer

This is a discussion on CPU Usage. - Programmer ; Hi all, I have a simple application that uses the standard windows WinProc message handling routines. when running it seems to use 95 - 100% CPU processing. I have stripped all of my other code out so I am down ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: CPU Usage.

  1. CPU Usage.

    Hi all,

    I have a simple application that uses the standard windows WinProc message
    handling routines.
    when running it seems to use 95 - 100% CPU processing. I have stripped all
    of my other code out so I am down to the bear minimum. Any ideas why this
    could be ?

    Regards,

    Auz.



  2. Re: CPU Usage.

    > Hi all,
    >
    > I have a simple application that uses the standard windows WinProc message
    > handling routines.
    > when running it seems to use 95 - 100% CPU processing. I have stripped all
    > of my other code out so I am down to the bear minimum. Any ideas why this
    > could be ?
    >
    > Regards,
    >
    > Auz.
    >

    Hi Auz,

    this can be many reasons, e.g.:
    - recursive functions
    - a loop without ending, e.g. while(1)
    - you send messages to your self, e.g. in the message handler for WM_PAINT
    you call InvalidateRect() -> this sends a new WM_PAINT message to your
    application

    Also you can post your code.

    Regards
    Frank



+ Reply to Thread