Click here to Skip to main content
15,916,945 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCreateProcess(), CMD and character encoding. Pin
Member 38520244-Sep-08 11:43
Member 38520244-Sep-08 11:43 
QuestionAnother CScrollBar question Pin
KellyR4-Sep-08 11:08
KellyR4-Sep-08 11:08 
AnswerRe: Another CScrollBar question Pin
Mark Salsbery4-Sep-08 11:33
Mark Salsbery4-Sep-08 11:33 
GeneralRe: Another CScrollBar question Pin
KellyR4-Sep-08 11:51
KellyR4-Sep-08 11:51 
Questionproblems in Modeless dialog (on ok) writing to a file(internet sessiosion - ftpconnection) Pin
simon alec smith4-Sep-08 9:17
simon alec smith4-Sep-08 9:17 
QuestionMessageBox changes a str255 variable Pin
Grant Hudgens4-Sep-08 9:11
Grant Hudgens4-Sep-08 9:11 
QuestionHow to stop PC suspending or sleeping while app is running.. Pin
montiee4-Sep-08 9:03
montiee4-Sep-08 9:03 
AnswerRe: How to stop PC suspending or sleeping while app is running.. Pin
Perspx4-Sep-08 9:29
Perspx4-Sep-08 9:29 
Assuming you're developing on Windows, take a look at the WM_POWERBROADCAST message (docs here) which is sent to all top-level window procedures when a power state is about to change. To prevent Windows going into standby/sleep mode, check whether the wParam is PBT_APMQUERYSUSPEND, and if so, return BROADCAST_QUERY_DENY when processing this message (Win 2k3, Win XP and Win 2k).

However, for Windows Vista, use the SetThreadExecutionState() function (docs here), which can prevent the system entering sleep mode. It is also supported in Win XP and Win 2k Pro.

Regards,
--Perspx

"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia

Introduction to Object-Oriented JavaScript

GeneralRe: How to stop PC suspending or sleeping while app is running.. Pin
montiee4-Sep-08 12:20
montiee4-Sep-08 12:20 
QuestionSetting Children Nodes of Tree View Based on Parent Node [modified] Pin
Stuck At Zero4-Sep-08 7:42
Stuck At Zero4-Sep-08 7:42 
AnswerRe: Setting Children Nodes of Tree View Based on Parent Node Pin
led mike4-Sep-08 7:55
led mike4-Sep-08 7:55 
GeneralRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Stuck At Zero4-Sep-08 8:00
Stuck At Zero4-Sep-08 8:00 
AnswerRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Mark Salsbery4-Sep-08 7:59
Mark Salsbery4-Sep-08 7:59 
GeneralRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Stuck At Zero4-Sep-08 8:03
Stuck At Zero4-Sep-08 8:03 
GeneralRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Mark Salsbery4-Sep-08 9:10
Mark Salsbery4-Sep-08 9:10 
GeneralRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Stuck At Zero4-Sep-08 9:32
Stuck At Zero4-Sep-08 9:32 
QuestionRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Mark Salsbery4-Sep-08 9:33
Mark Salsbery4-Sep-08 9:33 
AnswerRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Stuck At Zero4-Sep-08 9:35
Stuck At Zero4-Sep-08 9:35 
GeneralRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Mark Salsbery4-Sep-08 9:53
Mark Salsbery4-Sep-08 9:53 
GeneralRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Stuck At Zero4-Sep-08 10:03
Stuck At Zero4-Sep-08 10:03 
GeneralRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Mark Salsbery4-Sep-08 10:21
Mark Salsbery4-Sep-08 10:21 
GeneralRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Stuck At Zero4-Sep-08 10:33
Stuck At Zero4-Sep-08 10:33 
GeneralRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Mark Salsbery4-Sep-08 11:12
Mark Salsbery4-Sep-08 11:12 
GeneralRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Stuck At Zero8-Sep-08 5:25
Stuck At Zero8-Sep-08 5:25 
QuestionWhat message does a vertical CScrollBar send when it is moved? Pin
KellyR4-Sep-08 5:17
KellyR4-Sep-08 5:17 

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.