What's the proper response to WM_ENDSESSION with ENDSESSION_CLOSEAPP and wParam == FALSE?

后端 未结 1 1891
余生分开走
余生分开走 2020-12-20 12:40

According to the WM_ENDESSION docs, when lParam is ENDSESSION_CLOSEAPP and wParam is FALSE, \"the application should not shut down\".

相关标签:
1条回答
  • 2020-12-20 13:26

    Yes, a WM_ENDSESSION with wParam==false is simply for information. Prior to receiving this, your application will have received a WM_QUERYENDSESSION. If you did something to get ready to shut down in response to the WM_QUERYENDSESSION, you can un-do it when/if you received a WM_ENDSESSION with wParam=false. If you haven't taken any steps to start shutting down, you can just return 0.

    0 讨论(0)
提交回复
热议问题