Click here to Skip to main content
15,923,083 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: virtual operator "=" Pin
wubousc2-Jan-09 15:46
wubousc2-Jan-09 15:46 
GeneralRe: virtual operator "=" Pin
Mark Salsbery2-Jan-09 16:55
Mark Salsbery2-Jan-09 16:55 
GeneralRe: virtual operator "=" Pin
wubousc2-Jan-09 17:03
wubousc2-Jan-09 17:03 
GeneralRe: virtual operator "=" Pin
Mark Salsbery2-Jan-09 17:19
Mark Salsbery2-Jan-09 17:19 
GeneralRe: virtual operator "=" Pin
Mark Salsbery2-Jan-09 17:24
Mark Salsbery2-Jan-09 17:24 
GeneralRe: virtual operator "=" Pin
wubousc2-Jan-09 17:58
wubousc2-Jan-09 17:58 
AnswerRe: virtual operator "=" Pin
N a v a n e e t h2-Jan-09 16:12
N a v a n e e t h2-Jan-09 16:12 
QuestionCatching all exceptions Pin
charlieg2-Jan-09 10:36
charlieg2-Jan-09 10:36 
I'm trying to hook in a master "omg, we're going down, eject, eject, eject!" code chunk into my mfc dialog application. Basically, I do not want the user to see "chg.exe has done something bad and will need to terminate." What I want is to be able to capture as much forensic data to allow me to have a hope to diagnose what caused the crash.

So, in doing my research, I have seen two main approaches - override the run method of the CWinApp:

<br />
<br />
int CMyApp::Run() <br />
{<br />
   BOOL bRun;<br />
   BOOL bExit=FALSE;<br />
<br />
   while(!bExit)<br />
   {<br />
      try<br />
      {<br />
         bRun= CWinApp::Run();<br />
         bExit=TRUE;<br />
      }<br />
      catch (...)<br />
      {<br />
         AfxMessageBox(_T("Exeption!!!"));  // or trace or printf, does not matter.<br />
      }<br />
   }<br />
   return bRun;<br />
}<br />


I've also added the ProcessWndProcException handler at the app level as well.

What I have seen so far is that basically the code is ignored. If I hack up a little dialog app and divide by 0 or try to modify NULL, I see nothing at run time until I try to exit my app. What should one expect from these approaches?

Charlie Gilley
Will program for food...
<italic>Hurtling toward a government of the stupid, by the stupid, for the stupid we go. —Michelle Malkin

AnswerRe: Catching all exceptions Pin
Randor 2-Jan-09 11:21
professional Randor 2-Jan-09 11:21 
GeneralRe: Catching all exceptions Pin
charlieg2-Jan-09 11:27
charlieg2-Jan-09 11:27 
AnswerRe: Catching all exceptions Pin
Hamid_RT2-Jan-09 20:00
Hamid_RT2-Jan-09 20:00 
QuestionCatching Exceptions in MFC Pin
nobaq2-Jan-09 6:12
nobaq2-Jan-09 6:12 
AnswerRe: Catching Exceptions in MFC Pin
Randor 2-Jan-09 11:19
professional Randor 2-Jan-09 11:19 
AnswerRe: Catching Exceptions in MFC Pin
Hamid_RT2-Jan-09 20:02
Hamid_RT2-Jan-09 20:02 
Questionhow can i send mail in an MFC application using "CDO.Message" Pin
only_jack2-Jan-09 5:53
only_jack2-Jan-09 5:53 
QuestionVS Manifest Tool Pin
Richard Andrew x642-Jan-09 5:29
professionalRichard Andrew x642-Jan-09 5:29 
AnswerRe: VS Manifest Tool Pin
Mark Salsbery2-Jan-09 5:43
Mark Salsbery2-Jan-09 5:43 
GeneralRe: VS Manifest Tool Pin
Richard Andrew x642-Jan-09 6:06
professionalRichard Andrew x642-Jan-09 6:06 
QuestionSerializing CArrays Pin
softwaremonkey2-Jan-09 3:58
softwaremonkey2-Jan-09 3:58 
AnswerRe: Serializing CArrays Pin
softwaremonkey2-Jan-09 4:20
softwaremonkey2-Jan-09 4:20 
GeneralRe: Serializing CArrays Pin
CPallini2-Jan-09 4:43
mveCPallini2-Jan-09 4:43 
GeneralRe: Serializing CArrays Pin
Iain Clarke, Warrior Programmer2-Jan-09 11:25
Iain Clarke, Warrior Programmer2-Jan-09 11:25 
GeneralRe: Serializing CArrays Pin
CPallini2-Jan-09 20:55
mveCPallini2-Jan-09 20:55 
QuestionWM_LBUTTONDOWN not working with CListCtrl class!! Pin
SanjaySMK2-Jan-09 3:28
SanjaySMK2-Jan-09 3:28 
AnswerRe: WM_LBUTTONDOWN not working with CListCtrl class!! Pin
Nibu babu thomas2-Jan-09 4:52
Nibu babu thomas2-Jan-09 4: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.