Solved

Application Close button

Posted on 1998-10-09
3
362 Views
Last Modified: 2013-11-20
How do I grab the signal hit when the user clicks on the close button (the X in the upper right hand corner)?

I've got a function that's called when the ID_APP_EXIT message is sent but this isn't being hit when the close button is clicked, as I'd expected. And for some reason I can't find it in the MFC Devstudion 5.0 documentation.
0
Comment
Question by:winkle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Accepted Solution

by:
umarama earned 50 total points
ID: 1323164
In Mainframe ....
Add the following handler

ON_WM_SYSCOMMAND()

afx_msg void CMainFrame::OnSysCommand( UINT nID, LPARAM lParam )
{

   if (nID == SC_CLOSE)
   {
      // Do your processing
   }
}
0
 
LVL 6

Expert Comment

by:thresher_shark
ID: 1323165
Is there any particular reason you accepted my answer and then posted another question that asked the exact same thing winkle?  If you needed help, I think I could have provided it :-)
0
 

Expert Comment

by:umarama
ID: 1323166
To thresher_shark

Me think, we both answered winkle's question at the same time !!
He liked your answer and accepted it. Winkle is probabily not aware of this answer !
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question