-
-
未解决
有人懂wps二次开发吗
-
发表于:
2019-3-26 16:04
3304
-
这下面是一段代码
#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的接口类,
我现在想要得到字符串后变成分式,我这样不对,该怎样弄呢?
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!