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

C / C++ / MFC

 
GeneralRe: CBUTTON in MFC Pin
faroqtam2-Nov-04 11:41
faroqtam2-Nov-04 11:41 
GeneralRe: CBUTTON in MFC Pin
madretierra3-Nov-04 5:49
madretierra3-Nov-04 5:49 
GeneralRe: Use Clipboard in MFC Application Pin
David Crow2-Nov-04 2:22
David Crow2-Nov-04 2:22 
GeneralRe: Use Clipboard in MFC Application Pin
sweep1232-Nov-04 4:12
sweep1232-Nov-04 4:12 
GeneralRe: Use Clipboard in MFC Application Pin
David Crow2-Nov-04 4:51
David Crow2-Nov-04 4:51 
QuestionApp exit? Pin
Larsson2-Nov-04 1:43
Larsson2-Nov-04 1:43 
AnswerRe: App exit? Pin
Kapoor Vikrant2-Nov-04 1:59
Kapoor Vikrant2-Nov-04 1:59 
GeneralRe: App exit? Pin
Larsson2-Nov-04 2:02
Larsson2-Nov-04 2:02 
GeneralRe: App exit? Pin
Larsson2-Nov-04 2:23
Larsson2-Nov-04 2:23 
GeneralRe: App exit? Pin
RChin2-Nov-04 2:36
RChin2-Nov-04 2:36 
GeneralRe: App exit? Pin
Larsson2-Nov-04 2:41
Larsson2-Nov-04 2:41 
GeneralRe: App exit? Pin
RChin2-Nov-04 3:02
RChin2-Nov-04 3:02 
GeneralRe: App exit? Pin
GDavy2-Nov-04 2:46
GDavy2-Nov-04 2:46 
GeneralRe: App exit? Pin
Larsson2-Nov-04 2:49
Larsson2-Nov-04 2:49 
GeneralRe: App exit? Pin
Antony M Kancidrowski2-Nov-04 4:18
Antony M Kancidrowski2-Nov-04 4:18 
Something like this will help

Mainfrm header file
protected:
  afx_msg LRESULT OnMyEndSession(WPARAM wParam, LPARAM lParam);


Mainfrm cpp file

BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
  :
 ON_MESSAGE(WM_ENDSESSION, OnMyEndSession)
  :
END_MESSAGE_MAP()


LRESULT CMainFrame::OnMyEndSession(WPARAM wParam, LPARAM lParam) 
{
  if (lParam & ENDSESSION_LOGOFF)
  {
    :
   // We are logging off
    :
  }
  else
  {
   // We are shutting down
  }
  return 0;
}


Ant.

I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return!
- David Walliams (Little Britain)

GeneralRe: App exit? Pin
Larsson2-Nov-04 4:51
Larsson2-Nov-04 4:51 
QuestionWait for Data in pipe? Pin
peterchen2-Nov-04 1:42
peterchen2-Nov-04 1:42 
AnswerRe: Wait for Data in pipe? Pin
Blake Miller2-Nov-04 7:54
Blake Miller2-Nov-04 7:54 
QuestionHow to calculate the Bandwidth of our computer Pin
Anshul Mehra1-Nov-04 23:58
professionalAnshul Mehra1-Nov-04 23:58 
AnswerRe: How to calculate the Bandwidth of our computer Pin
Antony M Kancidrowski2-Nov-04 1:37
Antony M Kancidrowski2-Nov-04 1:37 
GeneralRe: How to calculate the Bandwidth of our computer Pin
Anshul Mehra2-Nov-04 3:20
professionalAnshul Mehra2-Nov-04 3:20 
GeneralRe: How to calculate the Bandwidth of our computer Pin
Antony M Kancidrowski2-Nov-04 4:04
Antony M Kancidrowski2-Nov-04 4:04 
AnswerRe: How to calculate the Bandwidth of our computer Pin
Selvam R2-Nov-04 2:56
professionalSelvam R2-Nov-04 2:56 
AnswerRe: How to calculate the Bandwidth of our computer Pin
ThatsAlok3-Nov-04 17:57
ThatsAlok3-Nov-04 17:57 
QuestionWhat is the defference about _T("abc") and "abc"? Pin
freehawk1-Nov-04 23:41
freehawk1-Nov-04 23:41 

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.