Click here to Skip to main content
15,913,587 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How Can I Embed a text file in Code ? Pin
Chris Meech19-Apr-12 2:49
Chris Meech19-Apr-12 2:49 
QuestionRe: How Can I Embed a text file in Code ? Pin
Maximilien19-Apr-12 2:49
Maximilien19-Apr-12 2:49 
AnswerRe: How Can I Embed a text file in Code ? Pin
Jochen Arndt19-Apr-12 2:52
professionalJochen Arndt19-Apr-12 2:52 
AnswerRe: How Can I Embed a text file in Code ? Pin
Lakamraju Raghuram19-Apr-12 3:01
Lakamraju Raghuram19-Apr-12 3:01 
GeneralRe: How Can I Embed a text file in Code ? Pin
enhzflep19-Apr-12 3:43
enhzflep19-Apr-12 3:43 
GeneralRe: How Can I Embed a text file in Code ? Pin
Lakamraju Raghuram19-Apr-12 3:52
Lakamraju Raghuram19-Apr-12 3:52 
GeneralRe: How Can I Embed a text file in Code ? Pin
enhzflep19-Apr-12 4:04
enhzflep19-Apr-12 4:04 
GeneralRe: How Can I Embed a text file in Code ? Pin
002comp19-Apr-12 18:21
002comp19-Apr-12 18:21 
GeneralRe: How Can I Embed a text file in Code ? Pin
Iain Clarke, Warrior Programmer20-Apr-12 4:35
Iain Clarke, Warrior Programmer20-Apr-12 4:35 
GeneralRe: How Can I Embed a text file in Code ? Pin
002comp20-Apr-12 0:44
002comp20-Apr-12 0:44 
GeneralRe: How Can I Embed a text file in Code ? Pin
Iain Clarke, Warrior Programmer20-Apr-12 4:37
Iain Clarke, Warrior Programmer20-Apr-12 4:37 
GeneralRe: How Can I Embed a text file in Code ? Pin
002comp22-Apr-12 18:14
002comp22-Apr-12 18:14 
Questionwsprintf in 32 and 64 bit windows. Pin
Johan Bertilsdotter18-Apr-12 22:32
Johan Bertilsdotter18-Apr-12 22:32 
AnswerRe: wsprintf in 32 and 64 bit windows. Pin
Richard MacCutchan18-Apr-12 22:39
mveRichard MacCutchan18-Apr-12 22:39 
AnswerRe: wsprintf in 32 and 64 bit windows. Pin
Lakamraju Raghuram18-Apr-12 23:06
Lakamraju Raghuram18-Apr-12 23:06 
AnswerRe: wsprintf in 32 and 64 bit windows. Pin
Johan Bertilsdotter19-Apr-12 0:46
Johan Bertilsdotter19-Apr-12 0:46 
AnswerRe: wsprintf in 32 and 64 bit windows. Pin
Chris Losinger19-Apr-12 0:58
professionalChris Losinger19-Apr-12 0:58 
GeneralRe: wsprintf in 32 and 64 bit windows. Pin
Johan Bertilsdotter19-Apr-12 1:26
Johan Bertilsdotter19-Apr-12 1:26 
GeneralRe: wsprintf in 32 and 64 bit windows. Pin
Chris Losinger19-Apr-12 1:50
professionalChris Losinger19-Apr-12 1:50 
AnswerRe: wsprintf in 32 and 64 bit windows. Pin
Johan Bertilsdotter19-Apr-12 1:04
Johan Bertilsdotter19-Apr-12 1:04 
GeneralRe: wsprintf in 32 and 64 bit windows. Pin
Richard MacCutchan19-Apr-12 1:36
mveRichard MacCutchan19-Apr-12 1:36 
QuestionDisable User Logoff Pin
softwaremonkey18-Apr-12 6:06
softwaremonkey18-Apr-12 6:06 
QuestionRe: Disable User Logoff Pin
David Crow18-Apr-12 6:21
David Crow18-Apr-12 6:21 
AnswerRe: Disable User Logoff Pin
softwaremonkey19-Apr-12 0:18
softwaremonkey19-Apr-12 0:18 
AnswerRe: Disable User Logoff Pin
smags1318-Apr-12 9:06
smags1318-Apr-12 9:06 
Method for XP or earlier is slightly different from Vista/Win7 from my experience.

For XP or earlier, return 0 for WM_QUERYENDSESSION and this should be enough.

For Vista/Win7, I haven't found a way to entirely stop logging off. But temporarily blocking logging off is possible. I would return 1 for WM_QUERYENDSESSION and register a blocking reason during WM_ENDSESSION, by calling ShutdownBlockReasonCreate. Then call ShutdownBlockReasonDestroy when your application is finished running.

You should obey the description mentioned in WM_ENDSESSION Message[^] and WM_QUERYENDSESSION[^] to make sure both user and Windows system are happy.

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.