Hi,
I wrote a MFC (non dialog/single document) VC++ application .
In the initInstance , I’m running while(1)
with sleep(1000)
.
While(1)
detects the key press (caps lock) and shows an icon (add icon) on the system tray.
If the same key is pressed again it removes the icon (delete icon) from system tray.
Adding and deleting icons is done by calling Shell_NotifyIcon
(NIM_ADD/NIM_DELETE).
It's working fine. But, when a lock system with (windows + L ) and after unlock this application is not responding, I mean the icon is not added when I press a key and I verified in the Task manager to my surprise my application is listed in running process tab.
For debugging I used logging some prints to disk file. I observed after unlock prints are not logged in the disk file.
Can you help me with a suggestion to make my application work after lock and unlock of the User.
Thanking you with anticipation
-Murty.