What are the differences between MFC Exception macros and
C++ exception keywords?

Answers were Sorted based on User's Feedback



What are the differences between MFC Exception macros and C++ exception keywords?..

Answer / hemalatha

The main difference between the macros and the keywords is
that the macros "automatically" delete a caught exception
when the exception goes out of scope. Code using the
keywords does not; exceptions caught in a catch block must
be explicitly deleted. Mixing macros and C++ exception
keywords can cause memory leaks when an exception object is
not deleted, or heap corruption when an exception is
deleted twice.

Is This Answer Correct ?    3 Yes 0 No

What are the differences between MFC Exception macros and C++ exception keywords?..

Answer / mullaikani

Class macros — TRY, CATCH, THROW, and so on — to use the C++
exception-handling keywords try, catch, and throw.
The major difference between the macros and the keywords is
that code using the macros "automatically" deletes a caught
exception when the exception goes out of scope. Code using
the keywords does not, so you must explicitly delete a
caught exception.

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More MFC Interview Questions

Tell me the different controls in MFC ?

5 Answers  


What is Multithreading

1 Answers   Invensys,


what is the use of CCmdTarget?

4 Answers   Siemens,


What is the difference between Extension DLL and Regular DLL?

6 Answers   GE,


what is message loop how mfc does it internally?

4 Answers   Aspire,






what is the component of CLR ?

8 Answers   AZTEC, Symphony,


If there is more than 100 control in a window how we can change the Taborder of a controls

4 Answers   Satyam,


what do you mean by psychic window?

2 Answers   Patni,


1) create ToolTip in MFC?

2 Answers   HCL,


1)How to create ToolTip in MFC?

2 Answers  


Hi All, I have created one MFC Dialog Based application.now if i am running the application its working fine,instead of closing he application i minimized the application,if i run the application again,i am getting the Dialog. I want to prevent the calling of application multiple times. please give me the code and let me know in which method i need to make changes. Praveer

7 Answers   HP,


is there any class which is not derived from Cobject

11 Answers   Patni,


Categories