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. GetLastInputInfo getting system wide idle info

GetLastInputInfo getting system wide idle info

Scheduled Pinned Locked Moved C / C++ / MFC
c++testingbeta-testinghelptutorial
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.
  • D Offline
    D Offline
    Donguy1976
    wrote on last edited by
    #1

    Hello All, I am using GetLastInputInfo in my MFC app to find the idle time for the app, but in my testing i found that it's giving system wide idle time. The reason i found that out is, i opened my app and let it stay on the background, and opened the outlook and started playing around with it. My app was supposed to be timed out after 1 min, but it didn't. Then i stopped playing with outlook for a minute, and then my app timed out. How to fix this?

    J 1 Reply Last reply
    0
    • D Donguy1976

      Hello All, I am using GetLastInputInfo in my MFC app to find the idle time for the app, but in my testing i found that it's giving system wide idle time. The reason i found that out is, i opened my app and let it stay on the background, and opened the outlook and started playing around with it. My app was supposed to be timed out after 1 min, but it didn't. Then i stopped playing with outlook for a minute, and then my app timed out. How to fix this?

      J Offline
      J Offline
      jeron1
      wrote on last edited by
      #2

      My take on GetLastInputInfo is that it's per user session not per application. To do what you need? I'm not sure. Maybe create a thread that listens for user input events sent to you app, and sends notification to your app to close after the specified time?

      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