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. Managed C++/CLI
  4. timer count down

timer count down

Scheduled Pinned Locked Moved Managed C++/CLI
c++
3 Posts 3 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.
  • M Offline
    M Offline
    MahaKh
    wrote on last edited by
    #1

    i want to show count down of seconds, as the user enters the answer the countdown should have stoped....just like a quiz program, i want to do it in VC++6

    J L 2 Replies Last reply
    0
    • M MahaKh

      i want to show count down of seconds, as the user enters the answer the countdown should have stoped....just like a quiz program, i want to do it in VC++6

      J Offline
      J Offline
      jk chan
      wrote on last edited by
      #2

      Create a dialog(whatever) , use function SetTimer to set the timer. (like SetTimer( your_window,QUIZ_TIMER,1000,0); ) then handle WM_TIMER message . In mfc you can handle it by adding the ON_WM_TIMER macro in message map. then in OnTimer callback check for your timer id then do whatever you need to display

      void MyDialog::OnTimer( UINT id )
      {
      if( id == QUIZ_TIMER)
      {
      // do whatever
      }
      }

      If u can Dream... U can do it

      1 Reply Last reply
      0
      • M MahaKh

        i want to show count down of seconds, as the user enters the answer the countdown should have stoped....just like a quiz program, i want to do it in VC++6

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Try the TaskDialog or ProgressBar (or any other) controls from MSDN[^].

        Just say 'NO' to evaluated arguments for diadic functions! Ash

        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