Click here to Skip to main content
15,890,506 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
AnswerRe: What is the defference about _T("abc") and "abc"? Pin
Pharago1-Nov-04 23:57
Pharago1-Nov-04 23:57 
AnswerRe: What is the defference about _T("abc") and "abc"? Pin
RChin2-Nov-04 0:13
RChin2-Nov-04 0:13 
GeneralCreating 16 color bitmap from DC Pin
Vinaya1-Nov-04 23:03
Vinaya1-Nov-04 23:03 
QuestionHow can I change a menu item when I click? Pin
lillah1-Nov-04 22:58
lillah1-Nov-04 22:58 
AnswerRe: How can I change a menu item when I click? [Modified] Pin
Antony M Kancidrowski2-Nov-04 1:32
Antony M Kancidrowski2-Nov-04 1:32 
GeneralactiveX Pin
hou_1261-Nov-04 22:48
hou_1261-Nov-04 22:48 
GeneralSystem tray colors Pin
Anonymous1-Nov-04 21:52
Anonymous1-Nov-04 21:52 

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.