Several tips used by the VC6.0 tool

zhaozj2021-02-16  44

As the saying goes, "Workers must have a good fault, you must first make a tool", I have used VC6.0 for a while. Slowly explore some of them, it is said that it is a skill, and some may be from the book. Online views, forgot). I think these techniques are more practical for everyone.

1. What should I do when the program code format is chaotic? You can slowly use Tab, Space to adjust, if it is a thousand rows, you can accept it. In fact, you can first select you. Adjusting code, then in "Edit-> Advanced-> Format Secetion", you will look more refreshing code immediately. Of course, you can select "Alt F8" and the same effect.

2. Use the macro to automatically add comments to the program .. Add a comment for each function, each class, and each file. Because I found some places in these things. And make your comments look good, clear, time, At this time, we can help us with macro. For example, I define 2 macros, one is given to the file (corresponding hotkey Alt H), one is to add any comments to the function (corresponding hotkey Alt f) The corresponding effects are as follows:

Where you need to add, you will appear in the things below Alt H.

/ * ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------- Module Name: Author: Pointer mailto: brilliant_zhang@21cn.com -------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------- * /

In the place where you need to add, press the thing below Alt F.

/ * ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ----------- purpose: Specifies the color of the connection, and connects the eligible click to the line without considering the degree, the radius can be randomly specified by the user Prameter: Date: 2004-3- 5 0:59:06 modify: ------------------------------------------ ------------------ * /

In fact, this can be easily done. The specific operation is as follows: Menu item "Tools -> Macro", point OK in the pop-up window (;) You seem to have something else, then you can come out, you Point "Record", let you take a name of the macro, in fact, a function name in the macro file, take a look at it, know what to do, such as "function recomment", is to give functions, then I started recording. In previous CPP or any other editable file, enter the above format, such as: (how to get it, you can get comfortable, it can be comfortable. The "stop button" on the toolbar is pressed. You can see the script (vbscript) you recorded (vbscript), I only modified a place, that is, add a Now function behind Date, get me to add Time time. Back to the previous dialog (that is, how come there, how come it? Press again), see "<< Options" no, click the one. You can give you just recorded Macro setting shortcut. If you have a more advanced feature for VBScript, you can consider yourself writing macro, not using recording. But I think these are already enough for me.

/ * ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ----------- Purpose:

Parameter: Date:

Modify: ------------------------------------------------ ------------ * /

转载请注明原文地址:https://www.9cbs.com/read-25182.html

New Post(0)