Ngày tạo 30 thg 7, 2013
Ngày sửa 16 thg 9, 2013
Mục tin 2674
How to register additional extension for Source Preview
How to register an additional file extension for the Source Preview Handler.
In this example we register the handler for the .xyz file extension:
Register extension in registry
Open regedit.exe
Under the shellex sub key, create a new sub key: HKEY_CLASSES_ROOT\SystemFileAssociations\.xyz \shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}
Under this key set the (Default) value to: {7091AD29-4F19-4935-8BB2-400A630D26C4}
If another application is already associated with the file type .xyz:
Go to HKEY_CLASSES_ROOT\.xyz
Read the value from the (Default) key. e.g. MyApp
Go to HKEY_CLASSES_ROOT\MyApp
Under the shellex sub key, create a new sub key: HKEY_CLASSES_ROOT\MyApp\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}
Under this key set the (Default) value to: {7091AD29-4F19-4935-8BB2-400A630D26C4}
Add extension to langs.model.xml
Edit %programdata%\SmartFTP\SourcePreview\langs.model.xml
Add the extension in an existing Language node to the ext attribute. For example if you want to add the extension to the xml lexer: <Language ext="xml xsml xsl xsd kml wsdl xyz " name="xml" commentEnd="-->
References
MSDN: How to Register a Preview Handler
Các từ khóa