具体如何设置快捷键,如何写函数,网上比较多,这里只给出我写的。
编写的程序比较笨
头文件注释:
macro InsertFileHeader()
{
//get crrunt time
szTime = GetSysTime(1)
Day = szTime.Day
Month = szTime.Month
Year = szTime.Year
hbuf = GetCurrentBuf()
InsBufLine(hbuf, 0, " /**")
InsBufLine(hbuf,1, "***************************************************************************")
InsBufLine(hbuf, 2, "* \@file: ")
InsBufLine(hbuf, 3, "* \@author: alw ")
InsBufLine(hbuf, 4, "* \@date: @Month@,@Day@,@Year@")
InsBufLine(hbuf, 5, "* \@brief: ")
InsBufLine(hbuf, 6, "* \@attention:")
InsBufLine(hbuf,7 , "**************************************************************************")
InsBufLine(hbuf, 8, " */")
}
函数注释:
macro InsertHeader()
{
hwnd = GetCurrentWnd()
lnFirst = GetWndSelLnFirst(hwnd)
hbuf = GetCurrentBuf()//申请变量空间,Get a handle to the current file buffer and the name
InsBufLine(hbuf, lnFirst, "/*******************************************************************************")
InsBufLine(hbuf, lnFirst+1, "*\@ Description : ")
InsBufLine(hbuf, lnFirst+2, "*\@ Input :")
InsBufLine(hbuf, lnFirst+3, "*\@ Output :")
InsBufLine(hbuf, lnFirst+4, "*\@ Return :")
InsBufLine(hbuf, lnFirst+5, "*******************************************************************************/")
}