• 实现注册表网页超链接调用应用程序实现


    发一下牢骚和主题无关:

        

    参考博客:http://www.cnblogs.com/glorysword/archive/2012/08/07/2626008.html

        基于BCB的程序计划实现

        1.BCB程序实现关键代码

    // 页写入网页调用
    	TRegistry *Registry1 = new TRegistry;
    	Registry1->RootKey = HKEY_CLASSES_ROOT;
    	UnicodeString path = "\\Test";
    	if(Registry1->OpenKey(path, true)==false)
    		ShowMsg(this,"读取注册表失败,没有读取注册表权限,请联系系统管理员!");
    	IsNeedDeleteOldVerSoftwareInfo = false;
    	if (Registry1->ReadString("") != "URL:Test Protocol") {
    		Registry1->WriteString("", "URL:Test Protocol");
    		IsNeedDeleteOldVerSoftwareInfo = true;
    	}
    	if (IsNeedDeleteOldVerSoftwareInfo)
    		Registry1->WriteString("URL Protocol", "");
    
    	Registry1->OpenKey(path + "\\DefaultIcon", true);
    	strAppPath = Registry1->ReadString("");
    	if (strAppPath != ("\"" + Application->ExeName + "\""))
    		Registry1->WriteString("", "\"" + Application->ExeName + "\"");
    
    	path += "\\shell\\open\\command";
    	Registry1->OpenKey(path, true);
    	strAppPath = Registry1->ReadString("");
    	UnicodeString ExePath = "\"" + Application->ExeName + "\" " + "%1";
    	if (strAppPath != ExePath)
    		Registry1->WriteString("", ExePath);
    
    	strAppPath = Registry1->ReadString("OldDefault");
    	if (strAppPath != ExePath)
    		Registry1->WriteString("OldDefault", ExePath);
    
    	delete Registry1;
    	/////////结束
        每日一道理
    “一年之计在于春”,十几岁的年纪,正是人生的春天,别辜负了岁月老人的厚爱与恩赐。行动起来,播种梦想吧!

        
    2.网页(html)的计划实现

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title></title>
    </head>
    <body>
     
     <a href="Test://aaaaaaaaa/">即时通讯</a>
     	  
    </body>
    </html>

        
     

        

    文章结束给大家分享下程序员的一些笑话语录: 3G普不普及现在已经不是看终端了,而是看应用,有好的,便宜实用的应用,花1000多买个能用的智能手机应该不是什么难事。反过来说,你200元拿一个智能手机,没有好的应用,看个电影要几十元,也是没人用3G。

  • 相关阅读:
    android获取sd卡路径方法
    Log4Net的使用
    asp.net网站发布
    用网站(WebSite而不是WebProject)项目构建ASP.NET MVC网站
    Asp.Net MVC 路由
    面试题:两个栈模拟队列&&两个队列模拟栈
    TextBlob Quick Start
    链表基本操作题
    leetcode341 扁平化嵌套数组
    细说浏览器输入URL后发生了什么
  • 原文地址:https://www.cnblogs.com/jiangu66/p/3084583.html
Copyright © 2020-2023  润新知