Click here to Skip to main content
15,898,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWindows Message Confusion! Gurus come and help! Pin
jinzhecheng7-Dec-05 5:33
jinzhecheng7-Dec-05 5:33 
AnswerRe: Windows Message Confusion! Gurus come and help! Pin
David Crow7-Dec-05 5:40
David Crow7-Dec-05 5:40 
GeneralRe: Windows Message Confusion! Gurus come and help! Pin
jinzhecheng7-Dec-05 5:51
jinzhecheng7-Dec-05 5:51 
AnswerRe: Windows Message Confusion! Gurus come and help! Pin
Phil J Pearson7-Dec-05 7:45
Phil J Pearson7-Dec-05 7:45 
AnswerRe: Windows Message Confusion! Gurus come and help! Pin
ThatsAlok7-Dec-05 19:29
ThatsAlok7-Dec-05 19:29 
QuestionSir, Can any One tell me what Message is Fired When We Press Atl+Ctrl+Del Pin
CodeVarma7-Dec-05 4:21
CodeVarma7-Dec-05 4:21 
AnswerRe: Sir, Can any One tell me what Message is Fired When We Press Atl+Ctrl+Del Pin
David Crow7-Dec-05 5:32
David Crow7-Dec-05 5:32 
GeneralRe: Sir, Can any One tell me what Message is Fired When We Press Atl+Ctrl+Del Pin
PJ Arends7-Dec-05 7:34
professionalPJ Arends7-Dec-05 7:34 
DavidCrow wrote:
When Windows is being shut down or restarted, it will send a WM_QUERYENDSESSION to each top-level window.


I see this answer quite often when it comes to questions about system shutdown/logoff so I want to clarify something. I have always been under the impression that the message to handle for system shutdown is WM_ENDSESSION not WM_QUERYENDSESSION. Query just asks the running apps if it is ok to shut down the system at this time, it makes no guarantees that the system is actually shutting down. If you close your app when it recieves the query it may end up being closed when the system is not shut down, leaving the user confused as to why the app closes on it's own for some unknown reason. Or am I misreading what it says in MSDN?



"You're obviously a superstar." - Christian Graus about me - 12 Feb '03

"Obviously ???  You're definitely a superstar!!!" - mYkel - 21 Jun '04

"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05

Within you lies the power for good - Use it!
GeneralRe: Sir, Can any One tell me what Message is Fired When We Press Atl+Ctrl+Del Pin
David Crow7-Dec-05 7:45
David Crow7-Dec-05 7:45 
QuestionPrinting from an alternate paper tray Pin
rcraigadams7-Dec-05 4:08
rcraigadams7-Dec-05 4:08 
AnswerRe: Printing from an alternate paper tray Pin
ThatsAlok7-Dec-05 23:10
ThatsAlok7-Dec-05 23:10 
QuestionProblem With Message Handling in Modeless Dialog Pin
Doug Knudson7-Dec-05 3:35
Doug Knudson7-Dec-05 3:35 
QuestionSir , will any help me .i want menu with CheckBox . Pin
CodeVarma7-Dec-05 2:50
CodeVarma7-Dec-05 2:50 
GeneralRe: Sir , will any help me .i want menu with CheckBox . Pin
khan++7-Dec-05 3:59
khan++7-Dec-05 3:59 
QuestionHelp. Create a bmp file in C++ Pin
Ming Luo7-Dec-05 2:39
Ming Luo7-Dec-05 2:39 
AnswerRe: Help. Create a bmp file in C++ Pin
jinzhecheng7-Dec-05 5:19
jinzhecheng7-Dec-05 5:19 
AnswerRe: Help. Create a bmp file in C++ Pin
Chris Losinger7-Dec-05 6:24
professionalChris Losinger7-Dec-05 6:24 
Questionhelp me to read serial number Pin
yasa2947-Dec-05 2:25
yasa2947-Dec-05 2:25 
AnswerRe: help me to read serial number Pin
kakan7-Dec-05 2:38
professionalkakan7-Dec-05 2:38 
GeneralRe: help me to read serial number Pin
ThatsAlok7-Dec-05 18:21
ThatsAlok7-Dec-05 18:21 
GeneralRe: help me to read serial number Pin
kakan7-Dec-05 18:44
professionalkakan7-Dec-05 18:44 
AnswerRe: help me to read serial number Pin
ThatsAlok7-Dec-05 18:21
ThatsAlok7-Dec-05 18:21 
QuestionHow to check the status of a Windows Service programatically Pin
amigo_rk7-Dec-05 2:11
amigo_rk7-Dec-05 2:11 
AnswerRe: How to check the status of a Windows Service programatically Pin
David Crow7-Dec-05 2:45
David Crow7-Dec-05 2:45 
AnswerRe: How to check the status of a Windows Service programatically Pin
ThatsAlok7-Dec-05 18:09
ThatsAlok7-Dec-05 18:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.