环境:vs2008,xp sp3
问题:拷贝一个对话框到一个新工程后,使用DoModal打开对话框,不弹出对话框,并在输出窗口有以下内容:
Detected memory leaks!
Dumping objects ->
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\occmgr.cpp(195) : {479} normal block at 0x00E32B68, 32 bytes long.
Data: < > ED 03 00 00 00 00 00 00 02 00 00 00 00 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\occmgr.cpp(181) : {478} normal block at 0x00E32B18, 20 bytes long.
Data: < > FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00
Object dump complete.
解决:一个个把对话框上的控件给删除,结果删掉一个richedit控件后,发现好了,认为是此问题,在原来的工程的搜索“richedit”,发现在
App::InitInstance()的函数里有AfxInitRichEdit();,新工程无,新工程添上后,好了