请问afxwin1.inl Line:24 是什么错误?

来源:百度知道 编辑:UC知道 时间:2024/05/15 07:48:16
我用HOOK在记事本下弹出对话框时出现Assert错误
afxwin1.inl Line:24

错误信息:afxwin1.inl
line22
解决方法是在新建窗体前加上AFX_MANAGE_STATE(AfxGetStaticModuleState());

FDT_DLLEXPORT void DragPanel()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
AfxEnableControlContainer();
AfxOleInit( );
CDragPanel *pPanel=new CDragPanel;
// if(m_hWnd)
// {
//m_pCtrlSite->Create();
pPanel->Create(IDD_DRAGPANEL);
pPanel->ShowWindow(1);
// }
}