0

I have an MFC dialog based application. Please anyone tell me how to capture the Switch user(windows logged in user) event from this MFC program.

I tried to capture the WM_QUERYENDSESSION from the Dialog's WindowProc function and I could able to capture the Shutdown, Restart and log off events using WM_QUERYENDSESSION. But the "Switch user" event is not getting called with WM_QUERYENDSESSION.

Any help is much appreciated.

0

1 Answer 1

1

Have a look at the WM_WTSSESSION_CHANGE message. Your application needs to call WTSRegisterSessionNotification() to receive this message.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.