使用CMFCPropertyGridCtrl,显示:将不会调用派生类中的OnDestroy或PostNcDestroy
该对话框将以静态模式弹出,如下所示:使用CMFCPropertyGridCtrl,显示:将不会调用派生类中的OnDestroy或PostNcDestroy,mfc,Mfc,该对话框将以静态模式弹出,如下所示: CTestDlg dlg; dlg.DoModal (); Ctestdlg包含cmfcpropertygridctrl控件 当ctestdlg对话框弹出时,您将看到: AppMsg - Warning: calling DestroyWindow in CWnd::~CWnd; OnDestroy or PostNcDestroy in derived class will not be called. 如果删除cmfcpropertygridctr
CTestDlg dlg;
dlg.DoModal ();
Ctestdlg包含cmfcpropertygridctrl控件
当ctestdlg对话框弹出时,您将看到:
AppMsg - Warning: calling DestroyWindow in CWnd::~CWnd; OnDestroy or
PostNcDestroy in derived class will not be called.
如果删除cmfcpropertygridctrl控件,则不会出现此警告
但是必须使用它,那么我们应该怎么做才能使警告消失呢?您可以在这里找到一些关于您的问题的参考资料:您是否已经尝试在
afxpropertygridctrl.cpp
文件的CMFCPropertyGridCtrl::ondestory
中放置断点以查看发生了什么?我的文件位于C:\ProgramFiles(x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.28.29333\atlmfc\src\mfc\afxpropertygridctrl.cpp
中,信息不足。演示如何创建mfcpropertygrid ctrl。