iCAx开思工具箱

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 24590|回复: 0
打印 上一主题 下一主题

这段代码怎么会出错呢,请教高手啊

[复制链接]
跳转到指定楼层
楼主
发表于 2009-4-22 11:15:36 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册登录,享用更多网站功能!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
这段代码就是想对打开的模型所有特征进行访问,可是编译时告诉说>正在编译...
1>Dlg.cpp
1>e:\vc++2005example\myprogram\myprogram\dlg.cpp(88) : error C2440: 'type cast' : cannot convert from 'overloaded-function' to 'ProFeatureVisitAction'
1>        None of the functions with this name in scope match the target type
1>生成日志保存在“file://e:\vc++2005example\myprogram\myprogram\Debug\BuildLog.htm”
这是什么原因呢?好像是说访问函数的事啊!有懂的吗?谢谢啊!!


////下面是在树控件中显示模型的特征树 m_tree.DeleteAllItems(); status=ProMdlNameGet(model,name); ProWstringToString(strName,name); HTREEITEM hItem=m_tree.InsertItem(TVIF_TEXT|TVIF_PARAM,(CString(strName)),0,0,0,0,-1,NULL,NULL); CArray*p_FeatureList=NULL; status=ProSolidFeatVisit(cur_solid,(ProFeatureVisitAction)PartFeatVisFn,NULL,(ProAppData)p_FeatureList); numoffeat=(int)p_FeatureList->GetCount(); if(numoffeat==0)return TRUE; for(int i=0;iGetAt(i),name); if(status==PRO_TK_E_NOT_FOUND) { ProFeatureTypenameGet(&p_FeatureList->GetAt(i),name); ProWstringToString(strName,name); sprintf(strName,"%s ID numeber %d",strName,p_FeatureList->GetAt(i).id); } else if (status==PRO_TK_BAD_INPUTS) { sprintf(strName,"invalid!"); } else { ProWstringToString(strName,name); } m_tree.InsertItem(TVIF_TEXT|TVIF_PARAM,CString(strName),0,0,0,0,i,hItem,NULL); } m_tree.Expand(hItem,TVE_EXPAND); ////显示完毕 return TRUE; } /////访问动作函数 ProError PartFeatVisFn(ProFeature* p_feature,ProError status,CArray* app_data) { ProBoolean isVisible; int* r_failed_feat_ids; int num=0; ProBoolean p_is_incomplete; ProFeatStatus p_status; status=ProArrayAlloc(0,sizeof(int),1,(ProArray*)&r_failed_feat_ids); status=ProSolidFailedFeatsList((ProSolid)(p_feature->owner),&r_failed_feat_ids); status=ProArraySizeGet((ProArray)r_failed_feat_ids,&num); for(int i=0;iid==r_failed_feat_ids[i]) { ProArrayFree((ProArray*)&r_failed_feat_ids); return PRO_TK_NO_ERROR; } } //////// status=ProFeatureIsIncomplete(p_feature,&p_is_incomplete); if(p_is_incomplete!=PRO_B_FALSE)return PRO_TK_NO_ERROR; status=ProFeatureStatusGet(p_feature,&p_status); if(p_status==PRO_FEAT_SUPPRESSED)return PRO_TK_NO_ERROR; if(p_status!=PRO_FEAT_ACTIVE) return PRO_TK_NO_ERROR; status=ProFeatureVisibilityGet(p_feature,&isVisible); if(isVisible==PRO_B_TRUE) { app_data->Add(*p_feature); } return PRO_TK_NO_ERROR; }
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 支持支持
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手板模型制作,在线3D打印服务

QQ|小黑屋|手机版|开思工具箱 CAD工具箱_CAM工具箱  

GMT+8, 2024-11-28 22:59 , Processed in 0.012241 second(s), 9 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2024 www.iCAx.org

快速回复 返回顶部 返回列表