SetTimer Function problems

This is a discussion on SetTimer Function problems within the Windows Programming forums, part of the Platform Specific Boards category; For some reason, the SetTimer Function is giving me some trouble. I call it using: SetTimer(hwnd, ID_TIMER, 40, NULL); And ...

  1. #1
    Registered User Swarvy's Avatar
    Join Date
    Apr 2008
    Location
    United Kingdom
    Posts
    195

    SetTimer Function problems

    For some reason, the SetTimer Function is giving me some trouble. I call it using: SetTimer(hwnd, ID_TIMER, 40, NULL);

    And for some reason, I get an error of "expected `)' before ';' token". But then where ever i call this function (originally it was in WM_CREATE), but if i call it in WM_COMMAND, all the other code in between is fine, so i know that its definitely that line, but i don't see how thats causing any problems?
    Last edited by Swarvy; 09-30-2008 at 08:27 PM.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,752
    Mis-matched ( ) in the declaration of ID_TIMER?

    > so i know that its definitely that line, but i don't see how thats causing any problems?
    Not necessarily.
    Create a whole new function before this one, and just call SetTimer from it. Does that compile as well?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User Swarvy's Avatar
    Join Date
    Apr 2008
    Location
    United Kingdom
    Posts
    195
    Quote Originally Posted by Salem View Post
    Mis-matched ( ) in the declaration of ID_TIMER?
    Thanks, I realised that I foolishly did this:
    Code:
    #define ID_TIMER              1001;

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 02:28 PM
  2. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-30-2005, 12:21 AM
  3. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  4. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 02:27 PM
  5. Problems with str.replace function
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 11-07-2001, 03:35 AM

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