首页
社区
课程
招聘
有人懂wps二次开发吗
2019-3-26 16:04 3060

有人懂wps二次开发吗

2019-3-26 16:04
3060

这下面是一段代码

#include "CFont0.h"
#include "CApplication0.h"
#include "CFont1.h"
#include "CSelection0.h"
#include "COMathFrac.h"
#include "CApplication.h"
#include "COMathRad.h"
#include "COMathScrPre.h"
#include "COMathDelim.h"
#include "CRange0.h"
#include "COMathFunction0.h"
#include "COMathFunctions0.h"




 CCodeCoversion CodeCov;
 StringMatch strmatch;
 
 CSelection0 sel;
 COMathFrac mathFrac;
 COMathRad mathRad;
 COMathScrPre mathScrPre;
 COMathDelim mathDelim;
 CRange0 rang;
 COMathFunction0 mathFunction;
 COMathFunctions0 mathFunctions;




  wstring patten1 = TEXT("[SX(](.*?)[][SX)]");
  wstring temp1=strmatch.WsearchResult(temp, patten1);
  CString str(temp1.c_str());
  CString left=str.Left(1);
  CString right=str.Right(1);
  rang.put_Text(left);
  mathFrac =mathFunctions.Add(rang,7,NULL,NULL);//代码运行到这里错误

  mathFrac.get_Num();  
  rang.put_Text(right);
  mathFrac.get_Den();  
  mathFrac.put_Type(1);  

看得懂吗?

temp1为一字符串,运用正则搜索,然后调用wps的接口类,

我现在想要得到字符串后变成分式,我这样不对,该怎样弄呢?




[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

收藏
点赞0
打赏
分享
最新回复 (3)
雪    币: 6208
活跃值: (3112)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
zhatian 2019-3-26 20:12
2
0
不是给你 接口文档了吗。 看就是啦。
雪    币: 18
活跃值: (138)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
janeyjhon 2019-3-27 10:35
3
0
不会呀
雪    币: 26
能力值: ( LV1,RANK:0 )
在线值:
发帖
回帖
粉丝
邓dg 2019-3-27 21:32
4
0
我懂 帮你搞
游客
登录 | 注册 方可回帖
返回