Timer again.

This is a discussion on Timer again. within the Windows Programming forums, part of the Platform Specific Boards category; Hi! I want to start a Timer when a button is pressed on my app. But i think a timer ...

  1. #1
    Android
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    363

    Timer again.

    Hi!
    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.
    Some useless programs i've wrote : slprogrammersheaven
    Youtube: http://www.youtube.com/user/geekyzine
    My amature IT Blog: http://everything-geeky.blogspot.com/
    My Flash games: http://flashweed.blogspot.com/

    (and, sorry for my amature english)

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

    gg

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

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