View Single Post
  #53 (permalink)  
Old 08-02-2007, 04:20 AM
Karpagarajan Karpagarajan is offline
D-Web Analyst
 
Join Date: Mar 2007
Posts: 299
Karpagarajan is on a distinguished road
Post Re: VC++ Tips & Tricks

Trapping Windows Shutdown and Cancel the shutdown...

Hi,

Use WM_QUERYENDSESSION for system shutdown in WndProc system function.

When that message is received, return 0, pass the WM_CANCELMODE message

to that window message and then shutdown on your own by using

ExitWindowEx Api .

................
thanks
__________________
Karpagarajan. R
Necessity is the mother of invention
Reply With Quote