create非模态对话框的assertion failure错误
来源:百度知道 编辑:UC知道 时间:2024/06/08 00:25:02
CNew *dlg=new CNew;
dlg->Create(IDD_DIALOG2, this);
出现assertion failure
用另一种方法:
CNew nw;
nw.Create(IDD_DIALOG2,this);
同样是assertion failure,都是winocc.cpp line279有错。
出错的地方是这:
void CWnd::MoveWindow(int x, int y, int nWidth, int nHeight, BOOL bRepaint)
{
ASSERT(::IsWindow(m_hWnd)); //line279
if (m_pCtrlSite == NULL)
::MoveWindow(m_hWnd, x, y, nWidth, nHeight, bRepaint);
else
m_pCtrlSite->MoveWindow(x, y, nWidth, nHeight, bRepaint);
}
请高手指教错误原因,怎么消除?
非常感谢!
dlg->Create(IDD_DIALOG2, this);
出现assertion failure
用另一种方法:
CNew nw;
nw.Create(IDD_DIALOG2,this);
同样是assertion failure,都是winocc.cpp line279有错。
出错的地方是这:
void CWnd::MoveWindow(int x, int y, int nWidth, int nHeight, BOOL bRepaint)
{
ASSERT(::IsWindow(m_hWnd)); //line279
if (m_pCtrlSite == NULL)
::MoveWindow(m_hWnd, x, y, nWidth, nHeight, bRepaint);
else
m_pCtrlSite->MoveWindow(x, y, nWidth, nHeight, bRepaint);
}
请高手指教错误原因,怎么消除?
非常感谢!
你的CNew应该是继承CDialog的吧。dialog不能用create创建,那是普通的CWnd的创建方式。你可以重载你的CNew类的构造函数,大体意思如下,调用CDialog的构造函数。
CNew::CNew(m_parentHwnd = this):CDialog(IDD_DIALOG2,m_parentHwnd);
create的意思
为什么我的网页打开的时候老是出现can`t create XMLHttpRequest object.这样的对话框
delphi里的Project option对话框是的Form选项卡中的Auto - create forms中的东西丢了
创建视图语句create view 视图名 as select_statement中为什么要用“as”呢?
为什么总出现can't create DOMDocument对话框
failed to create 的中文翻译
create与 invent的区别
create 和 produce的区别
create的用法意义详解
as ...as的用法