在线:窗口删除时出现警告:calling DestroyWindow in CWnd::~CWnd; OnDestroy or PostNcDestroy in derived class will not be called.
Warning: calling DestroyWindow in CWnd::~CWnd; OnDestroy or PostNcDestroy in derived class will not be called.
SDI程序在OnCreate()中使用new分配了一个派生自CWnd的自定义控件,并调用该类的Create进行创建,在~CMyView()中使用delete删除控件时出现如上所示警告.
将控件设为视图类的成员变量使用(即不用new,delete),警告同样出现.
附:控件中注册了一个窗口类,其Create()为创建该类窗口的一个实例.没有处理WM_DESTROY消息,没有重载PostNcDestroy,DestroyWindow().