Click here to Skip to main content
15,889,116 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Child Dialog gets hidden behind activex control Pin
Abhi Lahare11-Dec-09 5:26
Abhi Lahare11-Dec-09 5:26 
GeneralRe: Child Dialog gets hidden behind activex control Pin
Richard MacCutchan11-Dec-09 5:29
mveRichard MacCutchan11-Dec-09 5:29 
Questionmaking an non-blocking call in VC++ Pin
hrishiS10-Dec-09 23:03
hrishiS10-Dec-09 23:03 
AnswerRe: making an non-blocking call in VC++ Pin
CPallini10-Dec-09 23:15
mveCPallini10-Dec-09 23:15 
AnswerRe: making an non-blocking call in VC++ Pin
Cedric Moonen10-Dec-09 23:21
Cedric Moonen10-Dec-09 23:21 
AnswerRe: making an non-blocking call in VC++ Pin
Rajesh R Subramanian10-Dec-09 23:47
professionalRajesh R Subramanian10-Dec-09 23:47 
AnswerRe: making an non-blocking call in VC++ Pin
softwaremonkey11-Dec-09 4:48
softwaremonkey11-Dec-09 4:48 
QuestionCatching WM_POWERBROADCAST message Pin
Still learning how to code10-Dec-09 22:57
Still learning how to code10-Dec-09 22:57 
Hello, In my App I need to do some processing prior to the system going into a sleep mode, and once again when waking up.  
I have tried a number of different ways of implementing this, but haven't succeeded in sucessfully intercepting the message. The code for the current implementation is included below. My app is SDI, OS is Win2000.

LRESULT CADSL_LoggerView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
     // TODO: Add your specialized code here and/or call the base class
     if(message == WM_POWERBROADCAST)    
     {
          CString szMsg;
          BOOL bRC;
           switch (wParam)
        {
               case PBT_APMSUSPEND:
                    szMsg.Format("Received PBT_APMSUSPEND");
                    g_pLogFile->Add(szMsg);
                    bRC = KillTimer(ID_TIMER);
                    szMsg.Format("KillTimer() returned %i",bRC);
                    g_pLogFile->Add(szMsg);
                    break;
               case PBT_APMRESUMESUSPEND:
                    szMsg.Format("Received PBT_APMRESUMESUSPEND");
                    g_pLogFile->Add(szMsg);
                    bRC = SetTimer(ID_TIMER,300000,TimerProcs);     // 5 mins (300 secs)
                    szMsg.Format("SetTimer(300000) returned %i",bRC);
                    g_pLogFile->Add(szMsg);
                    break;
          }
     }

     return CChartView::WindowProc(message, wParam, lParam);
}

I have seen other messages go through the function, but a breakpoint after if(message == WM_POWERBROADCAST) never seems to fire on hibernation.   Can anyone give me some idea of what's going wrong, and how to track it down ?   Many thanks !

Doug

AnswerRe: Catching WM_POWERBROADCAST message Pin
KarstenK11-Dec-09 1:04
mveKarstenK11-Dec-09 1:04 
GeneralRe: Catching WM_POWERBROADCAST message Pin
Still learning how to code11-Dec-09 1:51
Still learning how to code11-Dec-09 1:51 
GeneralRe: Catching WM_POWERBROADCAST message Pin
KarstenK11-Dec-09 2:04
mveKarstenK11-Dec-09 2:04 
GeneralRe: Catching WM_POWERBROADCAST message Pin
Still learning how to code11-Dec-09 10:20
Still learning how to code11-Dec-09 10:20 
AnswerRe: Catching WM_POWERBROADCAST message ---------------- *** SOLVED *** Pin
Still learning how to code13-Dec-09 12:01
Still learning how to code13-Dec-09 12:01 
QuestionMultithreading in vc++ Pin
mathy10-Dec-09 20:41
mathy10-Dec-09 20:41 
AnswerRe: Multithreading in vc++ Pin
Cedric Moonen10-Dec-09 20:47
Cedric Moonen10-Dec-09 20:47 
AnswerRe: Multithreading in vc++ Pin
CPallini10-Dec-09 21:04
mveCPallini10-Dec-09 21:04 
AnswerRe: Multithreading in vc++ Pin
Rajesh R Subramanian10-Dec-09 21:06
professionalRajesh R Subramanian10-Dec-09 21:06 
QuestionDiff Between ShowWindow and End Dialog Pin
002comp10-Dec-09 20:36
002comp10-Dec-09 20:36 
AnswerRe: Diff Between ShowWindow and End Dialog Pin
Cedric Moonen10-Dec-09 20:44
Cedric Moonen10-Dec-09 20:44 
AnswerRe: Diff Between ShowWindow and End Dialog Pin
CPallini10-Dec-09 20:55
mveCPallini10-Dec-09 20:55 
GeneralRe: Diff Between ShowWindow and End Dialog Pin
002comp10-Dec-09 21:39
002comp10-Dec-09 21:39 
Questionprogarm code of c++ Pin
moinsheikh10-Dec-09 19:10
moinsheikh10-Dec-09 19:10 
AnswerRe: progarm code of c++ Pin
Tim Craig10-Dec-09 19:16
Tim Craig10-Dec-09 19:16 
AnswerRe: progarm code of c++ [modified] Pin
Adam Roderick J10-Dec-09 19:17
Adam Roderick J10-Dec-09 19:17 
AnswerRe: progarm code of c++ Pin
Stephen Hewitt10-Dec-09 19:55
Stephen Hewitt10-Dec-09 19:55 

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.