Thread: How to pause the WM_Timer

  1. #1
    Registered User
    Join Date
    Dec 2002
    Posts
    25

    How to pause the WM_Timer

    Hey, I have a program that utilizes the windows built in timer function.

    If you forgot what I'm talking about, go here.

    Anyway, so I know how to "KillTimer" and what not, but I'm wondering if anyone knows how to go about "pausing" this timer. I mean, I guess I could build in conditionals to *ignore* the timer for a while, but...I want it to be paused completely. Any ideas?

    Should I just KillTimer when its supposed to be paused, and then start it again...?

    Thanks for your help!

    Nimit

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    The way you pause it it to ignore it.

    case WM_TIMER:

    if(paused) break;
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  3. #3
    Registered User
    Join Date
    Dec 2002
    Posts
    25
    Ah, okay, I just posted to make sure there wasn't an actual function like PauseTimer() or something. But I guess i'll just do the ignore thing then Thanks again.

    Nimit

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 03-05-2009, 10:25 AM
  2. Fork(), pause(), and storing PID's in a linked list
    By vital101 in forum C Programming
    Replies: 10
    Last Post: 09-28-2007, 02:16 AM
  3. Dev-C++ Compile and Run with Pause
    By xmltorrent in forum C++ Programming
    Replies: 12
    Last Post: 03-29-2006, 11:55 PM
  4. pause program at console
    By datainjector in forum C# Programming
    Replies: 1
    Last Post: 03-27-2003, 12:36 AM
  5. Pause function ???
    By Unregistered in forum C++ Programming
    Replies: 8
    Last Post: 09-02-2001, 08:22 PM