Click here to Skip to main content
15,915,703 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralInterface Methods Pin
monrobot1312-May-04 14:20
monrobot1312-May-04 14:20 
GeneralRe: Interface Methods Pin
Milton Karimbekallil12-May-04 21:06
Milton Karimbekallil12-May-04 21:06 
GeneralEXCEPTION_BREAKPOINT not raised Pin
Brian Tietz12-May-04 14:18
Brian Tietz12-May-04 14:18 
GeneralRe: EXCEPTION_BREAKPOINT not raised Pin
Ryan Binns12-May-04 18:21
Ryan Binns12-May-04 18:21 
GeneralATL 7 WTL 7.1 Pin
monrobot1312-May-04 13:59
monrobot1312-May-04 13:59 
GeneralRe: ATL 7 WTL 7.1 Pin
Michael Dunn12-May-04 15:37
sitebuilderMichael Dunn12-May-04 15:37 
GeneralRe: ATL 7 WTL 7.1 Pin
monrobot1312-May-04 16:09
monrobot1312-May-04 16:09 
QuestionMessageBox Not Displayed from Destructor? Pin
Justin Cooke12-May-04 11:56
Justin Cooke12-May-04 11:56 
Greetings,

I'm trying to display simple debug messages from the constructor and destructor of a class (we'll call it MyClass.) I have a simple CDialog based project and if I declare a member object of MyClass in the main dialog class definition, I expect to see the "MyClass::MyClass()" message box when starting the app and the "MyClass::~MyClass()" when closing the app. The destructor message is never displayed. I've used ::MessageBox() and AfxMessageBox() and I've tried NULL and ::GetDesktopWindow() as the hWnd param to ::MessageBox.

Of course, if I just locally create and destroy the object in a function body (such as a button click event), then I see both messages.

Can anyone clue me in as to why this is happening? Does it have something to do with the fact that the main dialog has already been destroyed when the member MyClass object's destructor is called?

Thanks,
Justin
AnswerRe: MessageBox Not Displayed from Destructor? Pin
Diddy14-May-04 0:56
Diddy14-May-04 0:56 
GeneralRe: MessageBox Not Displayed from Destructor? Pin
Justin Cooke14-May-04 6:41
Justin Cooke14-May-04 6:41 
GeneralRe: MessageBox Not Displayed from Destructor? Pin
Diddy18-May-04 1:19
Diddy18-May-04 1:19 
GeneralRemoval of source control (VSS) Pin
Janovetz12-May-04 11:56
Janovetz12-May-04 11:56 
Generalfade screen Pin
johansmits12-May-04 11:16
johansmits12-May-04 11:16 
GeneralRe: fade screen Pin
Christian Graus12-May-04 12:13
protectorChristian Graus12-May-04 12:13 
Generalglobal #define !!! Pin
Hesham Amin12-May-04 10:42
Hesham Amin12-May-04 10:42 
GeneralRe: global #define !!! Pin
Christopher Lloyd12-May-04 11:07
Christopher Lloyd12-May-04 11:07 
Generalthank you but... Pin
Hesham Amin12-May-04 11:14
Hesham Amin12-May-04 11:14 
GeneralRe: thank you but... Pin
Christopher Lloyd13-May-04 1:52
Christopher Lloyd13-May-04 1:52 
GeneralRe: thank you but... Pin
Hesham Amin13-May-04 4:14
Hesham Amin13-May-04 4:14 
GeneralRe: global #define !!! Pin
Christian Graus12-May-04 12:14
protectorChristian Graus12-May-04 12:14 
QuestionIncredible functions... may exist ? Pin
Rafael Fernández López12-May-04 10:31
Rafael Fernández López12-May-04 10:31 
AnswerRe: Incredible functions... may exist ? Pin
Joe Woodbury12-May-04 11:01
professionalJoe Woodbury12-May-04 11:01 
GeneralRe: Incredible functions... may exist ? Pin
Rafael Fernández López12-May-04 11:05
Rafael Fernández López12-May-04 11:05 
GeneralRe: Incredible functions... may exist ? Pin
Joe Woodbury12-May-04 11:26
professionalJoe Woodbury12-May-04 11:26 
GeneralRe: Incredible functions... may exist ? Pin
Rafael Fernández López12-May-04 12:01
Rafael Fernández López12-May-04 12:01 

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.