expression cannot be evaluated 出错 CWebPage

ershuaixxv 2012-08-04 04:44:49
//view

void CMailView::CallJSFuns(const CString strName, const CString strParam)
//调用脚本函数
{
CWebPage web;
web.SetDocument(m_webBrowser.GetDocument());
web.CallJScript(strName,strParam);
}

//不知道哪儿错了
//CWebpage

bool CWebPage::SetDocument(IDispatch* pDisp)
{

CHECK_POINTER(pDisp); //提示这句出现expression cannot be evaluated
m_spDoc=NULL;
CComPtr<IDispatch> spDisp = pDisp;
HRESULT hr = spDisp->QueryInterface(IID_IHTMLDocument2,(void**)&m_spDoc);
if(FAILED(hr))
{
ShowError("Failed to get HTML document COM object");
return false;
}
return true;
}
...全文
100 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
schlafenhamster 2012-08-04
  • 打赏
  • 举报
回复
m_webBrowser.GetDocument()返回IDispatch* pDisp ?

3,055

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC HTML/XML
社区管理员
  • HTML/XML社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧