locked
Can Metro style apps receive session change , power broadcast... messages?

    Question

  • Dear all,

    I can get WM_WTSSESSION_CHANGE, WM_POWERBROADCAST...etc messages to get the information from OS on the desktop applications.

    But I also found that there is no concept of window handle on Metro style apps.

    Can anyone teach me is there any event can be used or how to achieve the same effect??

     

    Thank you very much!!

     




    • Edited by WuCaRo Thursday, January 19, 2012 8:00 AM
    Thursday, January 19, 2012 7:56 AM

Answers

All replies

  • What is the scenario that you need these for?

    The Metro style app should handle the app activating and suspending events. see Managing the application lifecycle and the App Activating and Suspending sample.

    --Rob

     

    Thursday, January 19, 2012 5:51 PM
    Owner
  •  

    Thank you for your reply, Rob. I'm sorry that I didn't describe clearly.

     

    My questions are:

    1. I suppose to do something when I get session lock (WTS_SESSION_LOCK) notification in my Metro style app.

        How can I reach this??

    2. I understand the Metro style app has suspending events.

        Can I get the OS suspend event (sleep/hibernate) like PBT_APMSUSPEND from WM_POWERBROADCAST message in Metro style app???

         Do the two suspending events have connection??

     

    Thank you!!!

     




    • Edited by WuCaRo Tuesday, January 31, 2012 2:04 AM
    Tuesday, January 31, 2012 2:01 AM
  • The Metro style app should handle the app activating and suspending events. seeManaging the application lifecycle and the App Activating and Suspending sample.

    It shouldn't care if it receives these because the user switched to a different app or because the system hibernated.

    --Rob

    • Marked as answer by Bob_Bao Tuesday, February 07, 2012 6:04 AM
    Tuesday, January 31, 2012 2:56 AM
    Owner