佚名通过本文主要向大家介绍了
系统DEBUG报了这样一个错误,请各位看看有没有遇到过!等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: 系统DEBUG报了这样一个错误,请各位看看有没有遇到过!
描述:
解决方案1:
描述:
Warning: calling DestroyWindow in CDialog::~CDialog --
OnDestroy or PostNcDestroy in derived class will not be called.
这个错误一般发生的环境是什么,如何消除呢?请指教谢谢!
解决方案1:
Assume, for example, you have overridden DestroyWindow in a CView-derived class. Since MFC source code does not call DestroyWindow in any of its CFrameWnd-derived classes, your overridden DestroyWindow will not be called unless you call it explicitly.
我是个警告,不是错误
解决方案3:这个不是说你在CDialog::~CDialog中调用了销毁窗口的DestroyWindow函数,那么PostNcDestroy和OnDestroy将不会被调用的,也就说没有用呀。
解决方案4:你在析构函数中调用DestroyWindow函数,已经没有意义了。