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. ATL / WTL / STL
  4. Checking whether the workstation is locked.

Checking whether the workstation is locked.

Scheduled Pinned Locked Moved ATL / WTL / STL
c++designjsonannouncement
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.
  • E Offline
    E Offline
    Emilio Guijarro
    wrote on last edited by
    #1

    Hi folks, I need my application to act in a different way when the workstation is locked, but I can't find any windows API to check this. I´ve found the following comment under the "LockWorkstation" function at MSDN: "There is no function you can call to determine whether the workstation is locked. To verify whether it is worth attempting to update your user interface, you can test whether or not your window is visible. This also has the advantage of identifying when the user cannot see your user interface because it is obscured by another window, minimized, or offscreen." Unfortunately, it doesn't work :mad:: I tried this calling the IsWindowVisible() method of CWindow (WTL) but it always return TRUE (window visible) even when workstation is locked :^). I'll appreciate comments and suggestions. Thanks in advace. "When I look into your eyes, there´s nothing there to see, nothing but my own mistakes staring back at me"

    D 1 Reply Last reply
    0
    • E Emilio Guijarro

      Hi folks, I need my application to act in a different way when the workstation is locked, but I can't find any windows API to check this. I´ve found the following comment under the "LockWorkstation" function at MSDN: "There is no function you can call to determine whether the workstation is locked. To verify whether it is worth attempting to update your user interface, you can test whether or not your window is visible. This also has the advantage of identifying when the user cannot see your user interface because it is obscured by another window, minimized, or offscreen." Unfortunately, it doesn't work :mad:: I tried this calling the IsWindowVisible() method of CWindow (WTL) but it always return TRUE (window visible) even when workstation is locked :^). I'll appreciate comments and suggestions. Thanks in advace. "When I look into your eyes, there´s nothing there to see, nothing but my own mistakes staring back at me"

      D Offline
      D Offline
      Douglas Troy
      wrote on last edited by
      #2

      Instead of checking to see if the workstation is locked, why not check for keyboard inactivity and change the how your application "works" by that means? Just a thought ...


      :..::. Douglas H. Troy ::..
      Bad Astronomy |Development Blogging|Viksoe.dk's Site

      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