Windows Shutdown
-
hello, I want to prevent user shutdown. I am catching the WM_QUERYENDSESSION message and returning a 1, which occording to the inline help should stop the shutdown process. It works on occassions but crashes on others, it seems to be completely inconsistent too...I know i am cathing the WM_QUERYENDSESSION so its not anything else... Is there something else I need to do??? Thanks in advance.
You need to do a call to SendMessage with the WM_QUERYRIGHTFORUM message before you can do this. Ok, I bet you also didn't expect two sarcastic replies in a row :-D Perl combines all the worst aspects of C and Lisp: a billion different sublanguages in one monolithic executable. It combines the power of C with the readability of PostScript. -- Jamie Zawinski
-
You need to do a call to SendMessage with the WM_QUERYRIGHTFORUM message before you can do this. Ok, I bet you also didn't expect two sarcastic replies in a row :-D Perl combines all the worst aspects of C and Lisp: a billion different sublanguages in one monolithic executable. It combines the power of C with the readability of PostScript. -- Jamie Zawinski
Daniel Turini wrote: Ok, I bet you also didn't expect two sarcastic replies in a row I would call this "Chain Reaction" :) Weiye Chen When pursuing your dreams, don't forget to enjoy your life...
-
You need to do a call to SendMessage with the WM_QUERYRIGHTFORUM message before you can do this. Ok, I bet you also didn't expect two sarcastic replies in a row :-D Perl combines all the worst aspects of C and Lisp: a billion different sublanguages in one monolithic executable. It combines the power of C with the readability of PostScript. -- Jamie Zawinski
Daniel Turini wrote: You need to do a call to SendMessage with the WM_QUERYRIGHTFORUM message... Just wait - if he can't even understand that this isn't a programming forum, he'll probably be emailing you asking why the compiler can't resolve the
WM_QUERYRIGHTFORUM
token! :rolleyes:Microsoft MVP, Visual C# My Articles
-
hello, I want to prevent user shutdown. I am catching the WM_QUERYENDSESSION message and returning a 1, which occording to the inline help should stop the shutdown process. It works on occassions but crashes on others, it seems to be completely inconsistent too...I know i am cathing the WM_QUERYENDSESSION so its not anything else... Is there something else I need to do??? Thanks in advance.
-
Daniel Turini wrote: You need to do a call to SendMessage with the WM_QUERYRIGHTFORUM message... Just wait - if he can't even understand that this isn't a programming forum, he'll probably be emailing you asking why the compiler can't resolve the
WM_QUERYRIGHTFORUM
token! :rolleyes:Microsoft MVP, Visual C# My Articles
:laugh: Excellent point! I can't wait to see your response to the question about directly accessing the BIOS over in the VB forum.:-D Heard in Bullhead City - "You haven't lost your girl -
you've just lost your turn..." [sigh] So true... -
Put a piece of duct tape over the power button. Remember, even if you win the rat race, you're still a rat.
#include <ducttape.h> tape SomeTape; SomeTape->Cover("PowerButton");
:rolleyes: Paul ;) Homepage: pvdw.ath.cx
Sonork: 100.33943 -
:laugh: Excellent point! I can't wait to see your response to the question about directly accessing the BIOS over in the VB forum.:-D Heard in Bullhead City - "You haven't lost your girl -
you've just lost your turn..." [sigh] So true...Now why would I visit the VB forum? :laugh:
Microsoft MVP, Visual C# My Articles
-
doh! yeah yeah, realised that I soon as i pressed the submit button. thanks for the smart, witty, sarcastic comment though I did'nt expect that for a second
rw104 wrote: realised that I soon as i pressed the submit button Then I think that the 7 minutes that elapsed between your post and the first response would have been ample time for you to delete your post from the lounge and repost it in a more appropriate forum. Especially given the speed of CP as of late.
Searching the web without Google is like straining sewage with your teeth.
Userfriendly, 2003/06/07 -
Now why would I visit the VB forum? :laugh:
Microsoft MVP, Visual C# My Articles
Erm, a little light entertainment? It does get rather slow around here at times...:-D Heard in Bullhead City - "You haven't lost your girl -
you've just lost your turn..." [sigh] So true... -
rw104 wrote: realised that I soon as i pressed the submit button Then I think that the 7 minutes that elapsed between your post and the first response would have been ample time for you to delete your post from the lounge and repost it in a more appropriate forum. Especially given the speed of CP as of late.
Searching the web without Google is like straining sewage with your teeth.
Userfriendly, 2003/06/07