Solved

Application Close button

Posted on 1998-10-09
3
360 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
deburging in oracle form 12 117
CRON statement to run every 3 minutes except on Monday morning 12am to 2am 7 121
modThree challenge 4 152
Capture logon name 13 115
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Suggested Courses

740 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