如何将指定类型的文件与我的程序相关联? [英] How to associate a specified type of file with my program?

查看:254
本文介绍了如何将指定类型的文件与我的程序相关联?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个自我开发的程序,我想使用它作为.jpg和.bmp文件的默认打开工具。我如何以节目的方式实现目标?

I have a self-developed program which I want to use as the default opening tool for .jpg and .bmp files. How can I achieve the goal progrmmatically?

有人说我必须添加一些注册表项。但我不知道我应该做什么。任何人都可以告诉我方法?

Some said that I have to add some registry entries. But I don't konw exactly what I should do. Can anyone tell me the method?

谢谢!

推荐答案

在OS X上,更新应用程序包中的Contents / Info.plist以保存 CFBundleDocumentTypes 数组。您在其中指定扩展名(CFBundleTypeExtensions),文档类型的名称,自定义图标等。

On OS X, update the Contents/Info.plist in the app package to hold a CFBundleDocumentTypes array. In which you specify the extension (CFBundleTypeExtensions), name of document type, custom icon etc.

这篇关于如何将指定类型的文件与我的程序相关联?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆