为什么我的控件在测试的时候在,当在测试容器中插入控件的时候就报错 debug assertion failed  !,是不是在工程选项里面要选择“可插入”???
如果是的话,怎样在现有的工程里面来更改这个设置???????

解决方案 »

  1.   

    吧错误写详细点!!
    在ActiveX控件测试容器中插入我的控件的时候,弹出对话框!
    报错如下!
    Debug Assert Failed!
    program :....
    f:\program files \ microsoft visual stdio8 \vc\atlmfc\include\atlctl.h
    Expression: h!=0
    ......
      

  2.   

    发现在atlctl中的
    if (m_spInPlaceSite->GetWindow(&hwndParent) == S_OK)
    {
    m_spInPlaceSite->GetWindowContext(&spInPlaceFrame,
    &spInPlaceUIWindow, &rcPos, &rcClip, &frameInfo); if (!m_bWndLess)
    {
    if (m_hWndCD)
    ShowWindow(m_hWndCD, SW_SHOW);
    else
    {
    HWND h = CreateControlWindow(hwndParent, rcPos);
    ATLASSERT(h != NULL); // will assert if creation failed//出错语句!!!!
    ATLASSERT(h == m_hWndCD);
    if(h == NULL)
    return E_FAIL;
    }
    }怎么回事啊??高手帮忙啊啊!!!怎么没人来啊!!!!!?????
      

  3.   

    添加AfxEnableControlContainer()在你的InitInstance()中