Domanda

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?

È stato utile?

Soluzione

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).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top