notepad++ plugin 编写步骤

来源:互联网 发布:数据库的安全性控制 编辑:程序博客网 时间:2024/06/05 15:31

notepad++ plugin 编写步骤

flyfish

Make your plugin in less 10 minutes
10分钟内制作你的插件

Here are the instructions to make your first Notepad++ plugin in less 10 minutes, by following 6 steps:

1 Download and unzip Notepad++ Plugin Template.
下载并解压 Notepad++Plugin Template

2 Open NppPluginTemplate.vcproj in your Visual Studio.
在Visual Studio中打开NppPluginTemplate.vcproj 本机试验版本是VC++2013

3 Define your plugin name in PluginDefinition.h
在PluginDefinition.h中定义你的插件名称
const TCHAR NPP_PLUGIN_NAME[] = TEXT(“你的插件名称”);

4 Define your plugin commands number in PluginDefinition.h
在 PluginDefinition.h中定义插件命令个数
const int nbFunc = 2;

5 Customize plugin commands names and associated function name (and the other stuff, optional) in PluginDefinition.cpp.
在PluginDefinition.cpp中自定义插件命令名称和关联函数名字

6 Define the associated functions.

定义关联函数,也就是关于函数的实现

You are guided by the following comments in both PluginDefinition.h and PluginDefinition.cpp files:
在PluginDefinition.h andPluginDefinition.cpp中有下面这些注释引导你(也就是上面的步骤)

//– STEP 1. DEFINE YOUR PLUGIN NAME –//
//– STEP 2. DEFINE YOUR PLUGIN COMMAND NUMBER –//
//– STEP 3. CUSTOMIZE YOUR PLUGIN COMMANDS –//
//– STEP 4. DEFINE YOUR ASSOCIATED FUNCTIONS –//

A good sample illustrates better the whole picture than a detailed documentation. You can check Notepad++ Plugin Demo to learn how to make some commands more complex.
//用一个好的例子来演示说明好于详细的文档,在Notepad++ Plugin演示中你可以学到更复杂的命令

0 0