Visual Studio 2010 SP1 MFC,Windows 7:使用复选框模式对话框运行ASSERT问题 [英] Visual studio 2010 SP1 MFC, windows 7: run ASSERT problem with checkbox modal dialog

查看:96
本文介绍了Visual Studio 2010 SP1 MFC,Windows 7:使用复选框模式对话框运行ASSERT问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用MFC编译并链接了一个复选框Modal Dialog,但是使用ASSERT停止了运行:

I built a checkbox Modal Dialog with MFC that compiled and linked, but the run got stopped with an ASSERT:

if (hWndCtrl == NULL)
{
  pSite = m_pDlgWnd->GetOleControlSite(nIDC);
  if (pSite == NULL
  {
    TRACE(traceAppMsg, ...);
    ASSERT(FALSE);
    AfxThrowNotSupportedException();
  }
  ...
}



我不明白如何修复它。在Visual Studio的早期版本中,我从未遇到过这个问题。



我尝试了什么:



我已经完成了代码没有帮助。


I don't understand how to fix it. In previous versions of Visual Studio I have never had this problem.

What I have tried:

I have stepped through the code. No help.

推荐答案

事实是:创建复选框时出现错误。



通常是资源标识符中的一些不匹配的原因。通常在resource.h中有一个大于1000的值和 NOT IDC_STATIC。



检查rc文件中的ID,该ID具有有效数字和相关成员变量的id。
The fact is: Something in the creation of the checkbox went wrong.

Often is some mismatch in the resource identifiers the cause. Normally some value greater than 1000 in the resource.h and NOT IDC_STATIC.

Check the ID in the rc file, that is has a valid number and the id of the associated member variable.


这篇关于Visual Studio 2010 SP1 MFC,Windows 7:使用复选框模式对话框运行ASSERT问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆