VC 6.0 快捷键添加/取消注释
来源:互联网 发布:红妍肌活精华露 知乎 编辑:程序博客网 时间:2024/05/21 17:03
取消/注释的宏,可以用于C++,java,VB
VC内使用方法:
将文件格式更改为dsm,放置于Program Files/Microsoft Visual Studio/COMMON/MSDev98/Macros目录下
打开VC——Customize——add-ins and Macro files
勾选上Comment,然后选择键盘,类别里选择Macros,CustomCommentOut设置好快捷键就可以了..
VC内使用方法:
将文件格式更改为dsm,放置于Program Files/Microsoft Visual Studio/COMMON/MSDev98/Macros目录下
打开VC——Customize——add-ins and Macro files
勾选上Comment,然后选择键盘,类别里选择Macros,CustomCommentOut设置好快捷键就可以了..
Sub CustomCommentOut()'DESCRIPTION: 注释/取消注释宏,可处理VB和C++、Java注释Dim winset win = ActiveWindowIf win.type <> "Text" Then MsgBox "This macro can only be run when a text editor window is active."ElseTypeOfFile = 3If TypeOfFile > 0 And TypeOfFile < 6 ThenIf TypeOfFile > 3 ThenCommentType = "'"' VB注释CommentWidth = 1ElseCommentType = "//"' C++、java 注释CommentWidth = 2End If StartLine = ActiveDocument.Selection.TopLineEndLine = ActiveDocument.Selection.BottomLineIf EndLine < StartLine ThenTemp = StartLineStartLine = EndLineEndLine = TempEnd If' 单行If EndLine = StartLine ThenActiveDocument.Selection.StartOfLine dsFirstColumnActiveDocument.Selection.CharRight dsExtend, CommentWidthIf ActiveDocument.Selection = CommentType ThenActiveDocument.Selection.DeleteElseActiveDocument.Selection.StartOfLine dsFirstTextActiveDocument.Selection.CharRight dsExtend, CommentWidthIf ActiveDocument.Selection = CommentType ThenActiveDocument.Selection.CharRight dsExtendActiveDocument.Selection.DeleteElseActiveDocument.Selection.StartOfLine dsFirstTextActiveDocument.Selection = CommentType + vbTab + _ ActiveDocument.SelectionEnd IfEnd If' 多行ElseFor i = StartLine To EndLineActiveDocument.Selection.GoToLine iCommentLoc = dsFirstColumnActiveDocument.Selection.StartOfLine CommentLocActiveDocument.Selection.CharRight dsExtend, CommentWidthIf ActiveDocument.Selection = CommentType ThenActiveDocument.Selection.DeleteElseActiveDocument.Selection.StartOfLine CommentLocActiveDocument.Selection = CommentType + _ ActiveDocument.SelectionEnd IfNextEnd IfElseMsgBox("Unable to comment out the highlighted text" + vbLf + _"because the file type was unrecognized." + vbLf + _"If the file has not yet been saved, " + vbLf + _"please save it and try again.")End IfEnd IfEnd Sub
- [转]VC 6.0 快捷键添加/取消注释
- VC 6.0 快捷键添加/取消注释
- VC++6.0中添加批量注释和取消批量注释快捷键
- 如何在VC++6.0中添加和取消批量注释
- 为VC++6.0 添加批量注释和批量取消注释 vcscript脚本
- 如何在VC++6.0中添加批量注释和取消批量注释的功能
- 如何在VC++6.0中添加批量注释和取消批量注释的功能
- VC++6.0注释快捷键设置
- VC++6.0注释快捷键设置
- VC++6.0注释快捷键设置
- VC++6.0注释快捷键设置
- VC++6.0注释快捷键设置
- VC++6.0注释快捷键设置
- VC++6.0注释快捷键设置
- 3个很有用VC的IDE工具宏:添加函数注释块、注释、取消注释
- 3个很有用VC的IDE工具宏:添加函数注释块、注释、取消注释
- 给VC++6.0加快捷注释和取消注释
- VC中为开发环境添加批量注释或取消注释(转)
- Java中的I/O流,包含字节流和字符流的常用介绍
- C#开发之自定义控件的简单使用
- android 应用socket 实例
- 加载位图
- 几种排序以及其时间复杂度
- VC 6.0 快捷键添加/取消注释
- *** glibc detected *** mainwindow: malloc(): smallbin double linked list corrupted: 0x01a73ab8 ***
- JAVA网络编程之UDP通信演示
- Delphi中巧妙利用RES文件
- Openwrt开发-英原文
- 使用ibatis时让控制台打印sql文的方法
- 防止phpddos攻击
- HDU 1535 Invitation Cards(多源点到单点最短路)
- MongoDB安装