Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Timer (without message map)

Timer (without message map)

Scheduled Pinned Locked Moved C / C++ / MFC
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Le Ridder Noir
    wrote on last edited by
    #1

    I've a class that's not a message map(non CWnd derived) and I want to add some kind of timer(delay) in my function. Thanks in Advance **Le Ridder Noir

    Considderd to be the worlds fastest knoppenbonker.
    one year of working experience with the worlds fastest copie paster(about 2000 lines a minute).
    And experience with the one and only NewEra Guru and Crystal Ace.**

    S 1 Reply Last reply
    0
    • L Le Ridder Noir

      I've a class that's not a message map(non CWnd derived) and I want to add some kind of timer(delay) in my function. Thanks in Advance **Le Ridder Noir

      Considderd to be the worlds fastest knoppenbonker.
      one year of working experience with the worlds fastest copie paster(about 2000 lines a minute).
      And experience with the one and only NewEra Guru and Crystal Ace.**

      S Offline
      S Offline
      Steen Krogsgaard
      wrote on last edited by
      #2

      If you want to just have a delay you can use sleep(). To use Windows timers without messages (and thus messagemaps) you can simply pass the address of a callback to SetTimer(). But remember, this callback cannot be a non-static member function of a class (because of the this pointer). Cheers Steen. "To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups