佚名通过本文主要向大家介绍了vc2010调用 surfer,vb调用surfer,c#调用surfer,surfer软件下载,surfer14教程等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: vc调用surfer问题
描述:
Docs->Add(srfDocPlot,&Doc);这句过不去,
提示:错误1error C2664: “IDocuments::Add”: 不能将参数 2 从“IPlotDocument **”转换为“IDispatch **”
我如果强制转换后运行时Doc就为空了
请问有做个这个的吗?
描述:
代码如下:
IApplicationPtr pApp(__uuidof(Application));
pApp->put_Visible(VARIANT_FALSE);
IDocumentsPtr Docs;
pApp->get_Documents(&Docs);
IPlotDocumentPtr Doc;
Docs->Add(srfDocPlot,/*(IDispatch**)*/&Doc);
IShapesPtr pshapes;
Doc->get_Shapes(&pshapes);
IMapFramePtr pMF;
CFileDialog dlg(TRUE, NULL, "*.grd" , OFN_HIDEREADONLY |OFN_OVERWRITEPROMPT,"离散点文件 *.grd");
if(dlg.DoModal()==IDOK)
{
CString strPatch=dlg.GetPathName();
pshapes->AddContourMap(_bstr_t(strPatch),&pMF);
}
Docs->Add(srfDocPlot,&Doc);这句过不去,
提示:错误1error C2664: “IDocuments::Add”: 不能将参数 2 从“IPlotDocument **”转换为“IDispatch **”
我如果强制转换后运行时Doc就为空了
请问有做个这个的吗?