Thread: Timer again.

  1. #1
    Android geek@02's Avatar
    Join Date
    Mar 2004
    Kurunegala Colony, Sri Lanka, Sri Lanka

    Timer again.

    I want to start a Timer when a button is pressed on my app. But i think a timer can only define under the WM_CREATE message handler of a window. Is there a way to define a working timer other than in WinMain()?
    Also i tried to create a Waitable timer. But CreateWaitableTimer() returns the error: "undeclared identifier". I'm programming on WindowXP and i've defined the _WIN32_WINNT 0x0501. Anybody know what's the problem?

    Thanks alot.
    My amature IT Blog:
    My Flash games:

    (and, sorry for my amateur English)

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    SetTimer() can be called at any time.


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. SIGALRM and timer
    By nkhambal in forum C Programming
    Replies: 1
    Last Post: 06-30-2008, 12:23 AM
  2. How to build a timer that counts the seconds elapsed?
    By Nazgulled in forum C Programming
    Replies: 17
    Last Post: 05-28-2007, 12:26 PM
  3. tic tac toe crashes :(
    By stien in forum Game Programming
    Replies: 4
    Last Post: 05-13-2007, 06:25 PM
  4. Need help with a count down timer
    By GUIPenguin in forum C# Programming
    Replies: 0
    Last Post: 07-07-2006, 04:18 PM