Click here to Skip to main content
15,889,216 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionXFS API Pin
Ghous Ahmed13-Jan-07 2:33
Ghous Ahmed13-Jan-07 2:33 
AnswerRe: XFS API Pin
Hamid_RT13-Jan-07 2:41
Hamid_RT13-Jan-07 2:41 
AnswerRe: XFS API Pin
viewman4-Jul-12 20:54
viewman4-Jul-12 20:54 
Questionhow to retrieve the application running in a remote computer? Pin
vedhapsg12-Jan-07 22:51
vedhapsg12-Jan-07 22:51 
AnswerRe: how to retrieve the application running in a remote computer? Pin
Don Box12-Jan-07 22:58
Don Box12-Jan-07 22:58 
GeneralRe: how to retrieve the application running in a remote computer? Pin
vedhapsg12-Jan-07 23:09
vedhapsg12-Jan-07 23:09 
AnswerRe: how to retrieve the application running in a remote computer? Pin
Cristian Amarie13-Jan-07 4:29
Cristian Amarie13-Jan-07 4:29 
QuestionOnClose Call Multiple Times Pin
User 1278212-Jan-07 21:16
User 1278212-Jan-07 21:16 
When the user in my application chooses exit from the menu, hits escape, or presses the X, I want my application to cleanup memory before closing. Usually I just put the cleanup code in the OnClose message handler. From a log file the cleanup generates, the OnClose gets called multiple times and my application crashes during the cleanup, attempting to delete the same memory multiple times.

I've tried hackish solutions that include setting a flag the first time the function is called and just returning the next time, but then the window never closes. There is nothing in my cleanup that would call OnClose() again.

Any ideas on how to approach fixing this? The debugger isn't being terribly useful.


Thanks

modified 12-Jul-20 21:01pm.

AnswerRe: OnClose Call Multiple Times Pin
CPallini12-Jan-07 21:48
mveCPallini12-Jan-07 21:48 
AnswerRe: OnClose Call Multiple Times Pin
Hadi Dayvary12-Jan-07 21:49
professionalHadi Dayvary12-Jan-07 21:49 
GeneralRe: OnClose Call Multiple Times Pin
#realJSOP12-Jan-07 23:39
mve#realJSOP12-Jan-07 23:39 
AnswerRe: OnClose Call Multiple Times Pin
Don Box12-Jan-07 22:09
Don Box12-Jan-07 22:09 
AnswerRe: OnClose Call Multiple Times Pin
#realJSOP12-Jan-07 23:53
mve#realJSOP12-Jan-07 23:53 
GeneralRe: OnClose Call Multiple Times Pin
User 1278217-Jan-07 10:31
User 1278217-Jan-07 10:31 
AnswerRe: OnClose Call Multiple Times Pin
Gary R. Wheeler13-Jan-07 2:52
Gary R. Wheeler13-Jan-07 2:52 
GeneralRe: OnClose Call Multiple Times Pin
#realJSOP13-Jan-07 3:31
mve#realJSOP13-Jan-07 3:31 
GeneralRe: OnClose Call Multiple Times Pin
Gary R. Wheeler13-Jan-07 4:02
Gary R. Wheeler13-Jan-07 4:02 
QuestionHow to change the Dialog's caption Pin
Mushtaque Nizamani12-Jan-07 19:59
Mushtaque Nizamani12-Jan-07 19:59 
AnswerRe: How to change the Dialog's caption Pin
Don Box12-Jan-07 20:02
Don Box12-Jan-07 20:02 
AnswerRe: How to change the Dialog's caption Pin
jk chan13-Jan-07 0:55
jk chan13-Jan-07 0:55 
AnswerRe: How to change the Dialog's caption Pin
Hamid_RT13-Jan-07 2:40
Hamid_RT13-Jan-07 2:40 
AnswerRe: How to change the Dialog's caption Pin
Eytukan13-Jan-07 22:03
Eytukan13-Jan-07 22:03 
QuestionLoading a class from a lib(dll) file Pin
Hadi Dayvary12-Jan-07 19:39
professionalHadi Dayvary12-Jan-07 19:39 
AnswerRe: Loading a class from a lib(dll) file Pin
Don Box12-Jan-07 19:55
Don Box12-Jan-07 19:55 
GeneralRe: Loading a class from a lib(dll) file Pin
Hadi Dayvary12-Jan-07 21:46
professionalHadi Dayvary12-Jan-07 21:46 

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.