Thread: SetTimer Function problems

  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 07:27 PM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    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.

  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-29-2005, 11:21 PM
  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, 01:27 PM
  5. Problems with str.replace function
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 11-07-2001, 03:35 AM