Click here to Skip to main content
15,900,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to create CTabCtrl with dialog as laying Pin
Sarath C26-Jun-06 2:42
Sarath C26-Jun-06 2:42 
AnswerRe: How to create CTabCtrl with dialog as laying Pin
Zac Howland26-Jun-06 4:10
Zac Howland26-Jun-06 4:10 
AnswerRe: How to create CTabCtrl with dialog as laying Pin
Sam Hobbs26-Jun-06 14:02
Sam Hobbs26-Jun-06 14:02 
QuestionWhat is wrong with this? Pin
James R. Twine26-Jun-06 2:27
James R. Twine26-Jun-06 2:27 
AnswerRe: What is wrong with this? Pin
Sarath C26-Jun-06 2:39
Sarath C26-Jun-06 2:39 
JokeRe: What is wrong with this? Pin
James R. Twine26-Jun-06 2:45
James R. Twine26-Jun-06 2:45 
GeneralRe: What is wrong with this? Pin
Zac Howland26-Jun-06 4:15
Zac Howland26-Jun-06 4:15 
JokeRe: What is wrong with this? Pin
James R. Twine26-Jun-06 4:56
James R. Twine26-Jun-06 4:56 
Zac Howland wrote:
This is only the case if you follow the MFC-style exception usage.


   Yep - That is why I specifically mentioned CException.

Zac Howland wrote:
I probably would have passed this exception by const-reference simply because if you are getting a memory exception, something in your memory is royally screwed (meaning, you shouldn't keep using the heap and expect normal results).


   Remember that MFC is free to allocate that exception object on another memory area as well, like static and/or global.  The special AfxThrow*Exception(...) functions may not just use the "plain" heap to allocate the thrown exception object.  And it should always be safe to call Delete() off that pointer (not the delete operator) because the exception object knows if it is heap-based or not.

   FWIW, I generally catch other types of exception as const reference as well.  You generally do not know what to do with a pointer (should I free it, and if so, how?), and there is that whole "slicing" thing... Smile | :)

   Peace!

-=- James
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
DeleteFXPFiles & CheckFavorites
(Please rate this post!)
AnswerRe: What is wrong with this? [modified] Pin
Viorel.26-Jun-06 2:47
Viorel.26-Jun-06 2:47 
JokeRe: What is wrong with this? Pin
James R. Twine26-Jun-06 3:02
James R. Twine26-Jun-06 3:02 
GeneralRe: What is wrong with this? [modified] Pin
ovidiucucu26-Jun-06 3:43
ovidiucucu26-Jun-06 3:43 
JokeRe: What is wrong with this? Pin
James R. Twine26-Jun-06 5:02
James R. Twine26-Jun-06 5:02 
AnswerRe: What is wrong with this? Pin
ovidiucucu26-Jun-06 3:35
ovidiucucu26-Jun-06 3:35 
AnswerRe: What is wrong with this? Pin
Sarath C26-Jun-06 3:48
Sarath C26-Jun-06 3:48 
GeneralRe: What is wrong with this? Pin
Naveen26-Jun-06 3:52
Naveen26-Jun-06 3:52 
GeneralRe: What is wrong with this? Pin
Sarath C26-Jun-06 4:25
Sarath C26-Jun-06 4:25 
AnswerRe: What is wrong with this? Pin
James R. Twine26-Jun-06 5:00
James R. Twine26-Jun-06 5:00 
GeneralRe: What is wrong with this? [modified] Pin
ovidiucucu26-Jun-06 5:06
ovidiucucu26-Jun-06 5:06 
GeneralRe: What is wrong with this? Pin
James R. Twine26-Jun-06 4:42
James R. Twine26-Jun-06 4:42 
AnswerRe: What is wrong with this? Pin
Chris Meech26-Jun-06 4:25
Chris Meech26-Jun-06 4:25 
Questionhow we caan add files to listbox Pin
happy_ram26-Jun-06 1:18
happy_ram26-Jun-06 1:18 
AnswerRe: how we caan add files to listbox Pin
Hamid_RT26-Jun-06 1:25
Hamid_RT26-Jun-06 1:25 
GeneralRe: how we caan add files to listbox Pin
happy_ram26-Jun-06 1:34
happy_ram26-Jun-06 1:34 
AnswerRe: how we caan add files to listbox Pin
Sarath C26-Jun-06 1:31
Sarath C26-Jun-06 1:31 
AnswerRe: how we caan add files to listbox Pin
Sarath C26-Jun-06 1:33
Sarath C26-Jun-06 1:33 

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.