Click here to Skip to main content
15,899,018 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionReplacing contents of a file Pin
Neelesh K J Jain2-Mar-09 9:58
Neelesh K J Jain2-Mar-09 9:58 
AnswerRe: Replacing contents of a file Pin
CPallini2-Mar-09 10:09
mveCPallini2-Mar-09 10:09 
GeneralRe: Replacing contents of a file Pin
Rajesh R Subramanian2-Mar-09 19:53
professionalRajesh R Subramanian2-Mar-09 19:53 
JokeRe: Replacing contents of a file Pin
CPallini2-Mar-09 21:18
mveCPallini2-Mar-09 21:18 
QuestionOnAppExit not called when X button clicked Pin
TimmySRX2-Mar-09 9:49
TimmySRX2-Mar-09 9:49 
AnswerRe: OnAppExit not called when X button clicked Pin
Stuart Dootson2-Mar-09 10:15
professionalStuart Dootson2-Mar-09 10:15 
GeneralRe: OnAppExit not called when X button clicked Pin
TimmySRX2-Mar-09 11:05
TimmySRX2-Mar-09 11:05 
GeneralRe: OnAppExit not called when X button clicked Pin
Iain Clarke, Warrior Programmer2-Mar-09 23:04
Iain Clarke, Warrior Programmer2-Mar-09 23:04 
TimmySRX wrote:
but just wanted to make sure that nothing else is needed inside the ExitInstance


Then call the base implementation also. It's the only way to be sure.

This code is taken from the documentation for ExitInstance (You do read those, I hope?)

// MySampleApp.cpp.

int CMySampleApp::ExitInstance() 
{
   // TODO: Add your specialized code here and/or
   // call the base class.

   if ( m_pMySampleMem )
      delete m_pMySampleMem;
   
   DoCleanup();

   return CWinApp::ExitInstance();                        // <---- Note the call to the base implementation
}


This is good practise for any MFC thing you override. You don't always want to do it, but you should make a conscious decision about it.

Iain.

Codeproject MVP for C++, I can't believe it's for my lounge posts...

QuestionSendKeys won't work Pin
Ran42-Mar-09 8:49
Ran42-Mar-09 8:49 
AnswerRe: SendKeys won't work Pin
led mike2-Mar-09 9:49
led mike2-Mar-09 9:49 
GeneralRe: SendKeys won't work Pin
Ran42-Mar-09 10:14
Ran42-Mar-09 10:14 
GeneralRe: SendKeys won't work Pin
CPallini2-Mar-09 10:19
mveCPallini2-Mar-09 10:19 
AnswerRe: SendKeys won't work Pin
«_Superman_»2-Mar-09 17:33
professional«_Superman_»2-Mar-09 17:33 
GeneralRe: SendKeys won't work Pin
davidjaybrown3-Mar-09 8:49
davidjaybrown3-Mar-09 8:49 
GeneralRe: SendKeys won't work Pin
«_Superman_»3-Mar-09 15:59
professional«_Superman_»3-Mar-09 15:59 
QuestionCompile Error Actual linking error ....Can someone help. Pin
FISH7862-Mar-09 8:01
FISH7862-Mar-09 8:01 
AnswerRe: Compile Error Actual linking error ....Can someone help. Pin
Jonathan Davies2-Mar-09 8:05
Jonathan Davies2-Mar-09 8:05 
AnswerRe: Compile Error Actual linking error ....Can someone help. Pin
Cedric Moonen2-Mar-09 8:06
Cedric Moonen2-Mar-09 8:06 
GeneralRe: Compile Error Actual linking error ....Can someone help. Pin
FISH7862-Mar-09 8:09
FISH7862-Mar-09 8:09 
GeneralRe: Compile Error Actual linking error ....Can someone help. Pin
Cedric Moonen2-Mar-09 8:12
Cedric Moonen2-Mar-09 8:12 
GeneralRe: Compile Error Actual linking error ....Can someone help. Pin
Cedric Moonen2-Mar-09 8:14
Cedric Moonen2-Mar-09 8:14 
GeneralRe: Compile Error Actual linking error ....Can someone help. Pin
FISH7862-Mar-09 8:34
FISH7862-Mar-09 8:34 
GeneralRe: Compile Error Actual linking error ....Can someone help. Pin
FISH7862-Mar-09 8:58
FISH7862-Mar-09 8:58 
GeneralRe: Compile Error Actual linking error ....Can someone help. Pin
Jonathan Davies2-Mar-09 12:23
Jonathan Davies2-Mar-09 12:23 
GeneralRe: Compile Error Actual linking error ....Can someone help. Pin
FISH7862-Mar-09 16:52
FISH7862-Mar-09 16: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.