CodePudding user response:
Great god quickly come out, I really very urgentCodePudding user response:
Windows all top-level Windows when shutdown will want to broadcast a message WM_QUERYENDSESSION, can distinguish between the lParam parameter is turned off or the cancellation of the user (lParam ENDSESSION_LOGOFF) when the cancellation of the user, and then Windows will wait until all the applications to the news returns TRUE will be shut down, therefore, as long as our application's handling of the news returns FALSE, Windows will not shut down,I want to know how to let this message returns false??????????
Crying is dizzy in the toilet! ~
CodePudding user response:
bool MyMainWindow: : winEvent (MSG, MSG * long * result)
{
The switch (MSG - & gt; Message)
{
Case WM_QUERYENDSESSION:
{
* the result=0;
break;
}
.
CodePudding user response:
Can provide the complete code??