关机信号检测
在vc下,用哪个函数可以检测到关机信号????当关机信号给出时,用vc下函数如何检测到,该怎么操作???
问题点数:20、回复次数:2Top
1 楼anothervip(Never ending... ...)回复于 2005-01-16 14:35:20 得分 15
see WM_QUERYENDSESSION
CWnd::OnQueryEndSession
afx_msg BOOL OnQueryEndSession( );
Return Value
Nonzero if an application can be conveniently shut down; otherwise 0.
Remarks
The framework calls this member function when the user chooses to end the Windows session or when an application calls theExitWindows Windows function. If any application returns 0, the Windows session is not ended. Windows stops calling OnQueryEndSession as soon as one application returns 0 and sends the WM_ENDSESSION message with a parameter value of FALSE for any application that has already returned nonzero.
Top
2 楼oyljerry(【勇敢的心】→ ㊣提拉米苏√㊣)回复于 2005-01-16 15:09:15 得分 5
WM_QUERYENDSESSION消息Top




