Click here to Skip to main content
15,917,624 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Convert _variant_t to char* Pin
Rolf Kristensen12-Dec-09 2:52
Rolf Kristensen12-Dec-09 2:52 
GeneralRe: Convert _variant_t to char* Pin
lemonash12-Dec-09 4:11
lemonash12-Dec-09 4:11 
QuestionTransparent Window in Remote desktop [modified] Pin
Cvaji11-Dec-09 1:15
Cvaji11-Dec-09 1:15 
AnswerRe: Transparent Window in Remote desktop Pin
Migounette11-Dec-09 6:09
Migounette11-Dec-09 6:09 
QuestionDifference between EndDialog and EndWindow? Pin
Prabhu09200911-Dec-09 0:22
Prabhu09200911-Dec-09 0:22 
AnswerRe: Difference between EndDialog and EndWindow? Pin
Adam Roderick J11-Dec-09 0:42
Adam Roderick J11-Dec-09 0:42 
AnswerRe: Difference between EndDialog and EndWindow? Pin
Richard MacCutchan11-Dec-09 0:54
mveRichard MacCutchan11-Dec-09 0:54 
AnswerRe: Difference between EndDialog and EndWindow? Pin
Rajesh R Subramanian11-Dec-09 1:30
professionalRajesh R Subramanian11-Dec-09 1:30 
Questionerror LNK2005: Pin
Benjamin Bruno10-Dec-09 23:56
Benjamin Bruno10-Dec-09 23:56 
AnswerRe: error LNK2005: Pin
Rajesh R Subramanian11-Dec-09 0:02
professionalRajesh R Subramanian11-Dec-09 0:02 
AnswerRe: error LNK2005: Pin
Richard MacCutchan11-Dec-09 0:55
mveRichard MacCutchan11-Dec-09 0:55 
AnswerRe: error LNK2005: Pin
KarstenK11-Dec-09 1:08
mveKarstenK11-Dec-09 1:08 
GeneralRe: error LNK2005: Pin
Benjamin Bruno11-Dec-09 20:10
Benjamin Bruno11-Dec-09 20:10 
GeneralRe: error LNK2005: Pin
KarstenK13-Dec-09 21:26
mveKarstenK13-Dec-09 21:26 
QuestionChild Dialog gets hidden behind activex control [modified] Pin
indra27110-Dec-09 23:27
indra27110-Dec-09 23:27 
AnswerRe: Child Dialog gets hidden behind activex control Pin
Richard MacCutchan11-Dec-09 0:52
mveRichard MacCutchan11-Dec-09 0:52 
GeneralRe: Child Dialog gets hidden behind activex control Pin
indra27111-Dec-09 4:55
indra27111-Dec-09 4:55 
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

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.