- ;; 显示菜单的函数
- ;; GroupName=菜单组名称
- ;; MenuName=菜单项名称
- ;; Location=在显示菜单中的倒数位置菜单的前面,
- ;; 如只在“帮助”和“窗口”菜单前,则为2
- (defun PlaceMenu (GroupName MenuName Location / CNT)
- (setq CNT 1)
- (while (< CNT 24)
- (if (menucmd (strcat "P" (itoa CNT) ".1=?"))
- (setq CNT (1+ CNT))
- (progn
- (if (> CNT Location)
- (setq CNT (- CNT Location))
- (setq CNT Location)
- )
- (menucmd (strcat "P" (itoa CNT) "=+" GroupName "." MenuName))
- (setq CNT 25)
- )
- )
- )
- )
|