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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Timers???

Timers???

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
2 Posts 2 Posters 2 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.
  • M Offline
    M Offline
    MrNiceBerG
    wrote on last edited by
    #1

    Well I've read several articles about timers and I still don't quite get how to use them. What I'm trying to do is hide(<-I can do this part) a dialog box for X minutes(<-I can't do this part). I don't understand what I need to do to get it to work. Thank you to any who helps and to those who have helped.

    S 1 Reply Last reply
    0
    • M MrNiceBerG

      Well I've read several articles about timers and I still don't quite get how to use them. What I'm trying to do is hide(<-I can do this part) a dialog box for X minutes(<-I can't do this part). I don't understand what I need to do to get it to work. Thank you to any who helps and to those who have helped.

      S Offline
      S Offline
      sudeesh
      wrote on last edited by
      #2

      while using the timers after the particular time (ie in millisecends specifed in the triggering function ) Timer Function will be triggered. In the OnInitDialog() function add the following , OnInitDialog() { CDialog::OnInitDialog(); ......... SetTimer(1000,5000,NULL); ShowWindow(SW_HIDE); return TRUE; } Implement the WM_TIMER using classWizard and add the following code OnTimer(...) { ShowWindow(SW_SHOW); KillTimer(1000); // 1000 is the Timer ID given in the SetTimer function } Here the OnTimer will be called after 5 seconds.

      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