Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用CMFCPropertyGridCtrl,显示:将不会调用派生类中的OnDestroy或PostNcDestroy_Mfc - Fatal编程技术网

使用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。