天气与日历 切换到窄版

 找回密码
 立即注册
中国膜结构网
十大进口膜材评选 十大国产膜材评选 十大膜结构设计评选 十大膜结构公司评选
查看: 5|回复: 0

verifySignature

[复制链接]
  • TA的每日心情
    开心
    昨天 15:23
  • 签到天数: 69 天

    [LV.6]常住居民II

    410

    主题

    167

    回帖

    2704

    积分

    管理员

    积分
    2704
    发表于 2024-6-22 09:46:18 | 显示全部楼层 |阅读模式
    bool CEntapp::verifySignature()
    {
            // Add your code for command My._MyVerify here
            int res=acedCommand(RTSTR,_T("sigvalidate"),RTNONE);
            //
            CString dwgname=curDoc()->fileName();
            CWnd *pwnd=acedGetAcadTextCmdLine();
            CWnd *hwndchild=pwnd->GetWindow(GW_CHILD);
            while (hwndchild)
            {
                    CString txt;
                    hwndchild->GetWindowText(txt);
                    //获取关键字的序号
                    int ind=-1,indlast=-1;
                    ind=txt.Find(dwgname);
                    indlast=ind;
                    while(ind>=0)
                    {
                            indlast=ind;
                            ind=txt.Find(dwgname,ind+1);
                    }
                    ind=indlast;
                    //
                    if(ind>=0)//说明是命令窗口
                    {
                            CString judge=txt.Mid(ind+dwgname.GetLength());
                            if(judge.Find(_T("数字签名有效"))==0)//valid Signatrue
                            {
                                    AfxMessageBox(dwgname+_T("签名有效"));
                                    return true;
                            }
                            else if(judge.Find(_T("无数字签名"))==0)//no Signatrue
                            {
                                    AfxMessageBox(dwgname+_T("无数字签名"));
                                    return false;
                            }
                            else
                            {
                                    AfxMessageBox(dwgname+_T("签名无效"));//Invalid Signatrue
                                    return false;
                            }
                            break;
                    }
                    //if(txt.Find(str)>=0)
                    //{
                    //        hwndchild->SetWindowText(_T("ok\n"));
                    //}
                    hwndchild=hwndchild->GetWindow(GW_HWNDNEXT);//C:\Users\Administrator\Desktop\1演示\1c.dwg数字签名有效。图形自签名后未被修改
            }       
            return true;

    }

     

     

     

     

    verifySignature
    中国膜结构网打造全中国最好的膜结构综合平台 ,统一协调膜结构设计,膜结构施工,膜材采购,膜材定制,膜结构预算全方位服务。 中国空间膜结构协会合作单位。
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    QQ|Archiver|手机版|中国膜结构网|中国膜结构协会|进口膜材|国产膜材|ETFE|PVDF|PTFE|设计|施工|安装|车棚|看台|污水池|

    GMT+8, 2024-7-1 05:24 , Processed in 0.056450 second(s), 22 queries .

    Powered by Discuz! X3.5

    © 2001-2024 Discuz! Team.

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