Frage

I'm working on windows 8 metro style app. I want to show a save confirmation message whenever unexpected events occur such as shutdown or restart and prevent windows to do that event. However, I didn't find any handler event that fitting my need. How can I do that?

War es hilfreich?

Lösung

In general, a Windows app can prevent shutdown (sometimes) by responding with FALSE to a WM_QUERYENDSESSION message. However, there is no way to get a WindowProc message from a Metro style app. The best you can do in a Metro style app is handle the Suspending event properly in your app (this will not prevent a shutdown of course).

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top