1.创建em文件,保存为macro.em
macro InsertFunHeader_zy()
{
hwnd = GetCurrentWnd()
lnFirst = GetWndSelLnFirst(hwnd)
hbuf = GetCurrentBuf()
str1 = "/*"
str2 = "** 函数功能: "
str3 = "** 函数参数: "
str4 = "** "
str5 = "** 返回值: "
str6 = "*/"
InsBufLine(hbuf, lnFirst, str6);
InsBufLine(hbuf, lnFirst, str5);
InsBufLine(hbuf, lnFirst, str4);
InsBufLine(hbuf, lnFirst, str3);
InsBufLine(hbuf, lnFirst, str2);
InsBufLine(hbuf, lnFirst, str1);
}
2.在工程中add and remove project files导入macro.em文件
3.在工程中options->key assignments,command中选择要设置快捷键的宏,设置快捷键即可