I am creating a VC++2008 Windows Form Application which needs some classes from our old VC6 project.
Then I have to add afxwin.h and afxmt.h into the stdafx.h to get compile fine. But when I run it, it crash with this information:

In order to find the cause, I removed all files from old project and just leave files created by IDE (professional version). It is still the same. Then I commented out these #include of afxwin.h and afxmt.h in the stdafx.h file, it worked fine (still no old files). If put back those #include it will crash again.
My project configruation is like this:

If I change Common Language Runtime Support to No Common Language Runtime Support. The code generated by IDE cannot be compiled. Other options are not good as well.
There must be a way to avoid the crash. Anybody can help me?
EDIT:
in the error dialog window, there is a line: File: f:\dd\vctools\crt_dbd\self_x86\crt\src\dbgheap.c But I don’t have f drive on my machine. why??
EDIT 2:
it worked if I run Release. why??
MFC is not getting initialized properly in this scenario. Right-click your Winforms project, Properties, Linker, Input. Set the “Force Symbol References” setting to
__DllMainCRTStartup@12.Connect feedback article is here.