CCreateContext context;
context.m_pNewViewClass = RUNTIME_CLASS(CMyView);
context.m_pCurrentFrame=this;
context.m_pCurrentDoc = NULL;
context.m_pLastView = NULL;
红字处报错,是什么原因?
error C2440: '=' : cannot convert from 'class KAIHUDLG *const ' to 'class CFrameWnd *'

解决方案 »

  1.   

    context.m_pCurrentFrame=this;
    不正确
    感觉应该是
    this->GetParent();
      

  2.   

    要看context.m_pCurrentFrame指的是啥类型,然后使用this指针中对应的类型赋值
      

  3.   


    您好,
    由于您长时间不结贴,上一次答复已超一个月并且已有最佳答案,本人帮你结贴。
    若是觉得答案不嘉,请放在本版的疑难杂症帖链接:
    http://bbs.csdn.net/topics/390351579。
    如果您有什么意见,请您联系我。