Checking whether the workstation is locked.
-
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"
-
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"
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