关机的消息是:WM_QUERYENDSESSION
WM_QUERYENDSESSION
nSource = (UINT) wParam; // source of end-session request
fLogOff = lParam // logoff flag
Parameters
nSource
Reserved for future use.
fLogOff
Value of lParam. Indicates whether the user is logging off or shutting down the system. Supported values include: ENDSESSION_LOGOFF.
Return Values
If an application can terminate conveniently, it should return TRUE; otherwise, it should return FALSE.
WM_QUERYENDSESSION
nSource = (UINT) wParam; // source of end-session request
fLogOff = lParam // logoff flag
Parameters
nSource
Reserved for future use.
fLogOff
Value of lParam. Indicates whether the user is logging off or shutting down the system. Supported values include: ENDSESSION_LOGOFF.
Return Values
If an application can terminate conveniently, it should return TRUE; otherwise, it should return FALSE.
解决方案 »
- vclzip3-我下载了 安装好后用不,提示:File not found: 'VCLUnZip.dcu'
- 如何判断数据集中某个字段的数据类型?
- 基础问题,请高手指点!谢谢!
- Image上连条线问题
- sql求救!!!!!!!!!!!!!!!!!!!!
- 请问熟悉系统架构的高手两个问题,关于第三方控件的选用,内详
- 给我一个例子1000分相送
- 绝难问题,用DELPHI或BCB怎么实现PHOTHSHOP那换头术?一张图加在另一张上可以完全透明?如果你答上来我什么都给你。
- 请问这是什么错误?invalid variant type conversion.
- 我用d5adoupgrade升级ADO,安装好了后,运行DELPHI,出错提示不能找到程序入口,为什么?请帮帮小弟呢,我编好的程序,由于TADOQUERY的BUG不能运行。赐教。
- 用NMpop3收中文邮件,为什么总是乱码,邮件头的格式是怎样的?
- Activexform控件问题
它会发送一个WM_QUERYENDSESSION消息给所有正在运行的程序。