문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top