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. ONTIMER

ONTIMER

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

    I am new to programming but I need to make a message box pop up on my screen everday at 5pm. From what I understand I need to use the ontimer function to do this. I was given some instructions on how to do it in the past but I didn't understand enough of the terms to do what was being talked about. Does anyone have some source code with some simple instructions that show how I could do this? Thank you very much. Mavrock

    C 1 Reply Last reply
    0
    • M Mavrock

      I am new to programming but I need to make a message box pop up on my screen everday at 5pm. From what I understand I need to use the ontimer function to do this. I was given some instructions on how to do it in the past but I didn't understand enough of the terms to do what was being talked about. Does anyone have some source code with some simple instructions that show how I could do this? Thank you very much. Mavrock

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Well, you can use WM_TIMER, but I wonder if you'd be better off figuring out how to poll the system clock. Obviously you still need to use a timer, but it would be more reliable than trusting the timer alone. Create an MFC project, dialog based, hit CTRL_W to bring up the class wizard, add an OnTimer message handler. In your initial code add something like: SetTimer(42, 60000, NULL); Then in your OnTimer, check the timer id to see if it's 42, if it is, check the time and then either reset the timer for another minute, or show your message box. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002

      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