How to pause the WM_Timer

This is a discussion on How to pause the WM_Timer within the Windows Programming forums, part of the Platform Specific Boards category; Hey, I have a program that utilizes the windows built in timer function. If you forgot what I'm talking about, ...

  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,702
    The way you pause it it to ignore it.

    case WM_TIMER:

    if(paused) break;
    Code:
    bool flip(bool value)
    {
        return std::pow(std::exp(1), std::complex<float>(0, 1) 
        * std::complex<float>(std::atan(1)*(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, 09: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, 10:55 PM
  4. pause program at console
    By datainjector in forum C# Programming
    Replies: 1
    Last Post: 03-26-2003, 11:36 PM
  5. Pause function ???
    By Unregistered in forum C++ Programming
    Replies: 8
    Last Post: 09-02-2001, 08:22 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21