Click here to Skip to main content
15,888,733 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC new should throw Pin
Richard MacCutchan10-Nov-11 6:21
mveRichard MacCutchan10-Nov-11 6:21 
GeneralRe: MFC new should throw Pin
bob1697210-Nov-11 7:28
bob1697210-Nov-11 7:28 
GeneralRe: MFC new should throw Pin
Richard MacCutchan10-Nov-11 11:27
mveRichard MacCutchan10-Nov-11 11:27 
GeneralRe: MFC new should throw Pin
bob1697210-Nov-11 15:56
bob1697210-Nov-11 15:56 
AnswerRe: MFC new should throw Pin
Chuck O'Toole10-Nov-11 16:41
Chuck O'Toole10-Nov-11 16:41 
GeneralRe: MFC new should throw Pin
bob1697210-Nov-11 21:11
bob1697210-Nov-11 21:11 
AnswerRe: MFC new should throw Pin
Chuck O'Toole11-Nov-11 1:57
Chuck O'Toole11-Nov-11 1:57 
GeneralRe: MFC new should throw Pin
bob1697211-Nov-11 14:53
bob1697211-Nov-11 14:53 
I had to dig around in MSDN and trace through a few MFC based allocation failures to find out how to change the MFC handler and came across AfxSetNewHandler which does (confirmed this) set the handler for allocation failures in an MFC application.

The last time I checked this out (MFC allocation failures) was 7 years back and I only remember walking away with confirming what MSDN says about CMemoryException - "Memory exceptions are thrown automatically by new". Its probably good for one to revisit this topic every so often as I had been concerned that I had been protecting my new incorrectly all this time after seeing the wizard code.

Thanks for helping me get to the bottom of this.
Smile | :)

modified 11-Nov-11 21:10pm.

GeneralRe: MFC new should throw Pin
Richard MacCutchan10-Nov-11 21:32
mveRichard MacCutchan10-Nov-11 21:32 
GeneralRe: MFC new should throw Pin
bob1697211-Nov-11 15:01
bob1697211-Nov-11 15:01 
AnswerRe: MFC new should throw Pin
Stefan_Lang10-Nov-11 2:13
Stefan_Lang10-Nov-11 2:13 
GeneralRe: MFC new should throw Pin
Orjan Westin10-Nov-11 3:28
professionalOrjan Westin10-Nov-11 3:28 
GeneralRe: MFC new should throw Pin
Stefan_Lang10-Nov-11 3:35
Stefan_Lang10-Nov-11 3:35 
Questiondev-c++ Pin
RealHigh9-Nov-11 9:25
RealHigh9-Nov-11 9:25 
AnswerRe: dev-c++ Pin
Richard Andrew x649-Nov-11 9:35
professionalRichard Andrew x649-Nov-11 9:35 
GeneralRe: dev-c++ Pin
Albert Holguin9-Nov-11 9:36
professionalAlbert Holguin9-Nov-11 9:36 
GeneralRe: dev-c++ Pin
RealHigh9-Nov-11 12:04
RealHigh9-Nov-11 12:04 
AnswerRe: dev-c++ Pin
Albert Holguin9-Nov-11 9:35
professionalAlbert Holguin9-Nov-11 9:35 
AnswerRe: dev-c++ Pin
Chris Meech9-Nov-11 9:43
Chris Meech9-Nov-11 9:43 
QuestionRe: dev-c++ Pin
David Crow9-Nov-11 10:06
David Crow9-Nov-11 10:06 
AnswerRe: dev-c++ Pin
RealHigh9-Nov-11 13:04
RealHigh9-Nov-11 13:04 
QuestionSign XML Documents with Digital Signatures Pin
dufduf9-Nov-11 2:58
dufduf9-Nov-11 2:58 
Questionplaying video inside any control on my dialog box using direct show??? Pin
VCProgrammer9-Nov-11 0:17
VCProgrammer9-Nov-11 0:17 
AnswerRe: playing video inside any control on my dialog box using direct show??? Pin
Mark Salsbery9-Nov-11 5:20
Mark Salsbery9-Nov-11 5:20 
GeneralRe: playing video inside any control on my dialog box using direct show??? Pin
VCProgrammer9-Nov-11 17:58
VCProgrammer9-Nov-11 17:58 

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.