1. Each sub-window in the main window is a Dock, the child window on the edge has two pressing in the upper right corner, one is closed, one is a pushpin. When the push is pressed, the child window will not automatically retract back to the edge, and it can be pulled out by the header bar of the drag window. I recommend all unwanted sub-windows, and then turn off all the docks to the bottom and the left, and the required subfamies are all put on the right, then pull the icon, when you want to see If the mouse is moved, you can see it. When you slide out, you will not block the code, and leave the biggest space for the code editing.
2. The toolbar also has a Dock property similar to the sub-window. Turn off the toolbar, you can drag it out and close it. Each of the toolbars and menus can be set, the method is right-click on the toolbar or menu bar, then point it to the pop-up menu point, then you can drag on the toolbar and menu bar, very Easy to complete the custom department. You can also select one of the right click to set the detailed properties of this. I recommend turning off all the tools, because the general usual command has a shortcut key, and uses the menu that is not commonly used, so that you can save your code to code.
3. The shortcut key settings for the keyboard can be set in the Tools Menu -> Options -> Environment -> Keyboard. There are some preset keyboard mappings, you can choose one of them, and then save themselves as your own solution after you will modify it. I strongly recommend the use of Visual C 6.0 keyboard map, very happy!
4. In Tools Menu -> Options -> Environment -> fonts and colors can set fonts and colors in the code editing. Here you can call the font because the default 9 word is too small, it is unclear. My setting is No. 11 young circle. For detailed settings of font color, you can use the back of the color to select the color you like, I still like the colorful look of the whole code!
First, the code editing part
1. If the indentation of a piece of code is very messy, space, Tab is a big pile of messy, then select this section, in Editing Menu -> Advanced, press formatting selected content. This code is automatically organized. If the space and Tab are used in a piece of code, the format seems to be neat, you can go to the Edit menu -> Advanced -> View blank, check the space and TAB in the code.
2. In the Tools Menu -> Options -> Text Editor -> C / C -> The launch clicked in the URL positioning, this item is not used in the C / C code editing, but it will cause some misunderstandings. Take the line number, I think this is a small space, but it is very convenient. Tuning the character size and indentation size in the text editor -> C / C -> Table characters are 4, which helps to compile neat code. If you open the line number, it is recommended to turn off the margins of the selected content in the text editor -> normal, because this is a bit more.
3. Set the path to the project file in the Tool Menu -> Options -> Project -> VC directory. The general setting contains files and library files.
4. There are two drop-down list boxes on the code compilation window. The left is the visible domain, the right is a function, you can achieve accurate positioning in a large source file through these two drop-down boxes. Use this function to greatly improve programming efficiency.
5. Outline shows a very good feature, but many people may not be used to. Can be displayed in Editing -> Outline Show -> Stop Outline Shows Turn off it. If you want to enable the outline display when you want to start, you can go to the outline mode when you open the file in the Tool Menu -> Options -> C / C -> format setting.
6. Select a piece of code and press TAB to increase its indentation; hold the ALT to stand a code; the mouse is placed on the line number bar or the code left distance (if you enable) will become a pointer to the opposite direction. At this time, you can select the corresponding line; select the code, you can drag the selected code to the appropriate position; press and hold the Ctrl and press the left and right direction keys to move the cursor and skip the keyword; Ctrl Home and Ctrl End are arrived Document top and bottom; contact Shift and then press the direction button to select the character skilled in the crate, can be used with Ctrl; Ctrl A can be selected; Ctrl = and Ctrl - can return to the location of the code you just viewed; You can use parentheses matching functions to help write complete code, brackets when parentheses match, this can be set in Tools Menu -> Options -> Environment -> fonts and colors. 7. Finding and replacement is very powerful, you can choose to use wildcards and regular expressions. Due to space relationships, please refer to MSDN for general contexts and regular expressions, I am here. Find or replace in the file, you can easily edit the lookup. You can use the scheduled search range, including the entire solution, VC contains directory, etc., you can also edit the detailed lookup range. For the lookup of the text file, the VC strip is looking for that efficiency than Windows files.
8. Contain the header file in the order below:
#define crtdbg_map_alloc
#include
#include
Then write at the beginning of the program:
_CRTSETDBGFLAG (_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
Thus, after the end of the retracted program, the memory leaks are dounted to the debug mode of the output sub-window.
Third, the compilation section:
1. If a large project, you need to include a lot of system header files, then you can write all of these headers to a stdafx.h file, then build a stdafx.cpp, there is a code, # INCLUDE "stdafx.h", then click Right Key in Solution Manager -> Your Engine, then press the Properties -> Configuration Properties -> C / C -> Preframe, set the creation / use precompiled head to : Create a precompiled header, the following two will be filled in, if not, then fill in stdafx.h. Then put your project completely regenerates a editor, then enter the original option, set the creation / use pre-compiler to: Set the precompiled head. Ok, your project is currently compiled.
2. If your program needs to introduce a specific library, you can write on the source file that needs to be referenced: #pragma comment (lib, "xxx.lib") This does not need to configure Properties -> Links -> Enter I will set it up, so you can improve your code compatibility.
3. If you are writing the DLL, and this DLL is used by another project, but these two projects are not in the same folder, so you have to copy newly compiled DLLs every time. Debug in the directory of Exe, if you forget to update, this may waste you many times and energy. In fact, you can write a BAT file, use the dos command copy, complete the copy task you need, then put this BAT file into the DLL directory, then enter the configuration properties -> Generate event -> Generate the event -> command line Fill in the BAT file name you want to execute, and the copy task is automatically executed after the compilation is over. 4. Tools Menu -> Options -> Environment -> Projects and Solutions, you can display the task list window when you have an error. This will automatically pop up the task list after you find an error, and you will be able to double-click on a task.
4. Resource part
1. When editing the dialog, select a control and then list all of its properties in the properties sub-window. Press the lightning button above, it will list all of its available events, double-click one of the events, jump into the corresponding source file, then you can add a handler for an event of the control.
2. When using the MFC programming, the properties sub-window displays this class available overwriting function and event handler, and double-click to write code. If you find that the properties sub-window and code are not copied, you can select the class you need to edit in the class view, or click the right mock in the code editing to press the synchronization class view.
3. An icon file is actually a icon package, which can contain a lot of size, color different icons, and can be built, deleted, and modify icons in the icon compiler of VC.NET. This feature is complete in the new image type, current icon image type, and delete image types in the image menu.
4. When the menu edits, enter - in the CAPTION property of the menu item -, the menu item is automatically changed.
Five, debugging part
1. In the Debug Menu -> Window submenu, you can open these very useful debug auxiliary windows. The windows described below can be opened here.
2. Click the left button on the left side of the code editing to add a breakpoint for this line. Right-click this breakpoint to modify the properties of this breakpoint, such as setting this breakpoint, then stop, or is a conditional judgment statement when this breakpoint will stop and wait. The breakpoint window can be more detailed and managed on the breakpoint in the source file.
3. Auto window and local variables You can check the value of almost all current you need to view, and here you can modify the value of this variable.
4. Register window You can view the status of all registers. Right click in this window to open the registers you need to view.
5. Call the stack, this is very useful when an error occurs. For example, memory access error, then stopped on a line in the delete source file, then you can find it to see which true error stem statement by the stack.
6. Command window, you can write VC predefined commands, and even write part C code. For example, P = 5; this is completely ok, please refer to MSDN for specific available commands.
7. Monitor window, enter the name of the variable you need to view, it will be displayed behind. If it is an object, point the number in front, it will be listed below. If there is an array Int a [6], you can enter: a, 6, so you can view the value of all elements in this array. You can also convert formats, such as token, x. For more detailed complicated features, please refer to MSDN.
5. Regarding the common shortcuts in Visualc 6.0 mode keyboard mapping mode
Conventional text editing part
Formatted selected content: Ctrl K, Ctrl f forward positioning: Ctrl =
Backward positioning: Ctrl -
Find: Ctrl F
Find in the file: Ctrl Shift F
Replace Ctrl H:
Replace in the file: Ctrl Shift H
Convert to uppercase: CTRL SHIFT U
Convert to lowercase: CTRL U
Note Selected content: Ctrl K, Ctrl C
Cancel notes: CTRL K, CTRL U
Open / close breakpoint: f9
Clear all breakpoints: CTR SHIFT F9
All compile: F7
Unit compilation: CTRL F7
Single step track: F10
Enter function: F11
Run to the cursor: Ctrl F10
Skip function: Shift F11
Run debug: f5
Stop debugging: Shift F5
Restart debugging: Ctrl Shift F5
Running is not debugging: Ctrl F5
Open / close bookmark: Ctrl K, Ctrl K
Previous bookmark: Ctrl K, Ctrl P
Next bookmark: Ctrl K, Ctrl N
Clear all bookmarks: CTRL K, CTRL L
Open Properties Window: Alt Enter
Previous document: Ctrl Tab
Next document: Ctrl Shift Tab
Open items: Ctrl Shift O
Open file: Ctrl O
Save: CTRL S
All Save: Ctrl Shift S
New file: ctrl n
Full screen display: SHIFT Alt ENTER