Click here to Skip to main content
15,896,557 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCEdit focus Pin
Fei Lok13-Aug-03 12:23
Fei Lok13-Aug-03 12:23 
GeneralRe: CEdit focus Pin
Dave Bryant13-Aug-03 12:50
Dave Bryant13-Aug-03 12:50 
GeneralRe: CEdit focus Pin
Anonymous14-Aug-03 5:26
Anonymous14-Aug-03 5:26 
GeneralRe: CEdit focus Pin
jhwurmbach13-Aug-03 21:48
jhwurmbach13-Aug-03 21:48 
GeneralAddition of control variable generates exception Pin
Binayak13-Aug-03 12:06
Binayak13-Aug-03 12:06 
GeneralRe: Addition of control variable generates exception Pin
Steve S13-Aug-03 23:39
Steve S13-Aug-03 23:39 
GeneralApp closure when Windows is shutting down.. Pin
RobJones13-Aug-03 11:35
RobJones13-Aug-03 11:35 
GeneralRe: App closure when Windows is shutting down.. Pin
Serge Krynine13-Aug-03 22:52
Serge Krynine13-Aug-03 22:52 
My understanding of the problem is that out of the following causes of exiting applications:

1) File | Exit menu option chosen;
2) Exit button on the title bar pressed;
3) The user or an application logs off current session;
4) The user “ends task” using Windows Task Manager;
5) The user or an application shuts down the Windows.

you need to run the routine when the application has some time to do this, namely when the standard shutting down of the application occur, namely when the 1) situation.

If this is true, you need to use standard command ID, namely the ID_APP_EXIT. If you define the OnAppExit() command handler on you class, which inherits from the CWinApp MFC’s class, that command handler should be called when 1) and should not be called when 2) - 5). That’s my understanding; you still need to test all the cases.

Serge

GeneralRe: App closure when Windows is shutting down.. Pin
Ryan Binns14-Aug-03 0:12
Ryan Binns14-Aug-03 0:12 
GeneralMFC database questions. Pin
Vassilis Papoulidis13-Aug-03 11:24
Vassilis Papoulidis13-Aug-03 11:24 
GeneralRe: MFC database questions. Pin
John M. Drescher13-Aug-03 11:29
John M. Drescher13-Aug-03 11:29 
GeneralColor for Dialog Pin
Anonymous13-Aug-03 10:38
Anonymous13-Aug-03 10:38 
GeneralRe: Color for Dialog Pin
Kelly Herald13-Aug-03 10:46
Kelly Herald13-Aug-03 10:46 
GeneralRe: Color for Dialog Pin
PJ Arends13-Aug-03 10:56
professionalPJ Arends13-Aug-03 10:56 
GeneralRe: Color for Dialog Pin
Kelly Herald13-Aug-03 11:24
Kelly Herald13-Aug-03 11:24 
GeneralColor for Dialog Pin
Anonymous13-Aug-03 10:37
Anonymous13-Aug-03 10:37 
Generali don't get it Pin
Member 52834313-Aug-03 10:18
Member 52834313-Aug-03 10:18 
GeneralRe: i don't get it Pin
Kelly Herald13-Aug-03 10:40
Kelly Herald13-Aug-03 10:40 
GeneralRe: i don't get it Pin
Chris Richardson13-Aug-03 18:17
Chris Richardson13-Aug-03 18:17 
GeneralSDI to Dialog based Pin
Binayak13-Aug-03 10:15
Binayak13-Aug-03 10:15 
GeneralRe: SDI to Dialog based Pin
David Crow13-Aug-03 10:17
David Crow13-Aug-03 10:17 
GeneralRe: SDI to Dialog based Pin
Chris Meech13-Aug-03 10:23
Chris Meech13-Aug-03 10:23 
GeneralInterface problem with MF Dialog app. + COM object Pin
Brian van der Beek13-Aug-03 8:43
Brian van der Beek13-Aug-03 8:43 
Questionpasting from excel -- supported formats? Pin
elf2313-Aug-03 8:32
elf2313-Aug-03 8:32 
AnswerRe: pasting from excel -- supported formats? Pin
Joey Bloggs15-Aug-03 23:49
Joey Bloggs15-Aug-03 23:49 

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.