I know these errors can be put down to bad pointers etc, but I've been through all my code and cannot for the life of me work out why this is happening.
I have an SDI MFC app (written in VS2005) and when I close it via the 'close' button it always triggers breakpoints on exit (_after_ the onclose method in CMainFrame has been called and completed).
However, it closed absolutely fine with no errors when I use File>Exit or double click the top left of the window to close it.
Please help, is there a simple workaround for this so I can capture the close button click and make it do exactly what file>exit does instead, or are there any other quick suggestions as to what may be causing it?
Thanks in advance!