Function category |
Shortcut Key |
Description |
File (File) |
CTRL + n |
New Project |
CTRL + O |
Open File |
Find (Search) |
Alt + F3/Ctrl + F |
The Search dialog box is displayed. |
F3 |
Find Next |
Shift + F3 |
Find the previous |
CTRL + F3 |
Find the next |
CTRL + Shift + F3 |
Find the previous |
CTRL +]/Ctrl + E |
Search for the second half of the arc |
CTRL + Shift +] |
Find the lower half of the arc and select the section (including the arc) between the arc) |
CTRL + Shift + E |
Find the lower half of the arc and select the section (including the arc) between the arc) |
F4 |
Find the next error/warning location |
Shift + F4 |
Find the last error/warning location |
CTRL + G |
Goto (locate a variable in a row, etc) |
CTRL + ALT + T |
Brings up the Completion list box presents a function list box to facilitate function insertion. |
Display |
CTRL + T |
Show variable type |
CTRL + Shift + Space |
Show function parameters |
CTRL + Shift + 8 |
Convert all hops and spaces to "^" and "'", or restore |
Format |
CTRL + u |
Converts the selected region to lowercase. |
CTRL + Shift + u |
Converts the selected region to uppercase. |
Alt + F8 |
Automatic format rescheduling |
Set |
Alt + F7 |
Project setting Project Settings |
Build (Created) |
F7 |
Build (compile and link to the EXE file) |
CTRL + F7 |
Compile (Compilation) |
CTRL + F5 |
Execute (compile + link + run) |
CTRL + Shift + F5 |
Restarts the program (re-runProgram) |
CTRL + break |
Stops the build (stop compilation) |
Debug (Debugging) |
F5 |
Go (sequential execution) |
F11 |
Step) |
F10 |
Step over (sequential execution without entering a loop or function) |
Shift + F11 |
Step out (jump out of the current function) |
CTRL + F10 |
Run to cursor (automatically executed before the statement pointed by the user cursor) |
Shift + F5 |
Stop debugging (stop debugging) |
F9 |
Insert/remove breakpoint (insert/remove breakpoints in the current row) |
CTRL + F9 |
Enable/disable a breakpoint (Application/block breakpoint) |
CTRL + Shift + F9 |
Remove all breakpoints |
1. Check whether parentheses in the program match
Move the cursor to the brackets to be checked (such as braces {}, square brackets [], Parentheses (), and angle brackets <>), and press Ctrl +]. If the brackets match correctly, the cursor jumps to the matching brackets. Otherwise, the cursor does not move and the chassis horn generates a warning.
2. view the macro definition of a macro (or variable or function)
Move the cursor to a macro You Want To Know. For example, on the most common declare_map_message, click F12 (or right-click go to defition ...), If browse files is not created, a dialog box is displayed. Click OK. Then, the page jumps to the location where those objects are defined.
3. Format a mess Source code
Select the source Code , Press ATL + F8.
4. The member variables or functions cannot be displayed during editing.
Delete the. NCB file and reopen the project.
5. How to organize a large number of classes in the classview
You can right-click the classview view to create a folder (new folder) and drag classes of similar properties to the corresponding folder to make the entire view clear.
6. Specify the pre-processing position.
Locate the cursor to symmetric # If, # endif in the source file, and use Ctrl + K.
7. How to add Lib in the system to the current project
In project | Settings | link | object/library modules: Enter the Lib name, and use an empty grid to open different Lib.
8. How to add the system header file (. h) to the current project.
# Include: indicates to compile the file to the VC system directory. Use # include "filename. H" to tell the compiling file to be found in the current directory.
9. How to Use Assembly debugging in Studio
Press Ctrl + f7in the workbench debugger status.
10. How to Handle System messages that classziard cannot find
If you want to process system messages such as wm_nchittest in classwizard, change the message filter to window on the class info page of classwizard.
11. How to delete a class cleanly
Delete the corresponding. h and. cpp files from the FileView In workspace, close the project, and delete the corresponding. h and. cpp files and. CLW files from the actual folder.
12. If you want the console application to support the MFC class library
You can include the MFC library in the console application, but the console application is single-threaded by default, and the MFC is multi-threaded. To solve this problem, in the project setting-> C/C ++ option, select code generation and select debug multithread in the use run-time library drop-down box.
13.if he has only the executable code. EXE file
Use VC open file in NT to open the *. EXE file in resources mode, modify the resource file directly, and save the file.
Appendix: VC project file description
The. Opt project parameter file for the development environment. Such as the tool bar position and other information;
. APS (appstudio file), Resource auxiliary file, binary format, usually don't worry about it.
. The CLW classwizard information file is actually in the INI file format. If you are interested, please study it. sometimes the classwizard has a problem. You can manually modify the CLW file to solve the problem. if this file does not exist, you will be prompted to re-create it each time you use classwizard.
. DSP (workflow studio project): A project file in the text format. If you are not familiar with it, Do not manually modify it. DSW (workflow studio workspace) is a workspace file. Other features are similar to those of DSP.
. PLG is a compilation information file. The error and warning information files during compilation (actually an HTML file) are generally of little use. there is an option in tools-> options to control the generation of this file.
. HPJ (help project) is the project for generating help files, which can be processed using microsfot help compiler.
. MDP (Microsoft devstudio project) is an earlier version of the project file. To open this file, you will be prompted to convert it to a new DSP format.
. BSc is used to browse project information. This file is required if source Brower is used. if you do not need this function, you can remove the generate browse info file in project options to speed up compilation.
. Map is the image information record file of the execution file, unless you are very familiar with the underlying system, this file is generally not needed.
. PCH (pre-compiled file) is a pre-compiled file, which can speed up compilation, but the file is very large.
. PDB (Program database) Records Program-related data and debugging information, which may be useful during debugging.
. Exp is generated only when the DLL is compiled, and some information in the DLL file is recorded. It is generally useless.
. NCB does not compile the browsing file (No compile browser ). You can delete this file when the Automatic completion function fails. It is automatically generated after build.
// Select characters
1. (cool) press the Alt key and click the left mouse button to drag it. You can select text blocks and columns.
2. Press ctrl and click a word to select a word or double-click it.
3. move the cursor at the starting position, hold down shift, and click the left mouse button to select a segment (you can also browse it in IE)
Yes. You can't see the cursor,
4. Double-click the left mouse button to select a word.
5. Press SHIFT + the up and down arrow keys to select rows.
6. Press Ctrl + Shift + left and right arrow keys to select a word.
7. Press Ctrl + C to copy the row where the cursor is located.
8. Press SHIFT + [end] to select the row.
//////////////////////////////////////
F1 displays help. If the cursor stops at a certain character of the Code, the corresponding help content in msdn is displayed.
F2 bookmarks: Ctrl + F2 -- set a bookmarks in a row (cancel again and again)
F2 -- jump to the next bookmarks
Shift + F2 -- jump to the previous bookmarks
CTRL + Shift + F2 -- delete all bookmarks
F3 search: Ctrl + F3 -- search in the file. If the current cursor is on a string,
Then the string is automatically searched. Similar Ctrl + F
F3 -- find the next string in the file
Shift + F3 -- find a string in the file
F4 (not the popular garden one) if it is compiled or find in files, you can locate it one by one.
CTRL + F4 -- close the file
Alt + F4 -- disable VC (as defined in Windows)
F5 compilation and execution F5 -- Compilation and execution through VC
CTRL + F5 -- execute the compiled EXE directly without passing through VC
Shift + F5 -- after F5 is run, stop the program directly from the VC (you can simulate the current situation)
CTRL + Shift + F5 -- run again
After switching the splitwindow window, you can convert the window where the cursor is located.
F7 compilation F7 compilation Project
CTRL + F7 compile the current file
Alt + F7 Project Settings dialog box
The sticky key selected by F8 is more commonly used: holding down SHIFT + direction key
Alignment of the written format of the Code selected by Alt + F8
F9 sets the breakpoint Ctrl + F9 to delete all breakpoints
Alt + F9 display the edit breakpoint dialog box
CTRL + F9 breakpoint invalid
F10 one-step execution (Debug)
CTRL + F10 execute to the row where the cursor is located
(Try SHIFT + F10)
F11 tracking
Shift + F11 jump to the previous call stack
F12 jumps to the function definition at the beginning (compilation with the Browse info option is required. We recommend that you do not select this option and generate a large file)
Frequently Used editing
CTRL + W display classwizard, while many interfaces are used
CTRL + z/Ctrl + y Undo/Redo
CTRL + u letter to lowercase (some VC is not set)
CTRL + Shift + u letter converted to uppercase (some VC is not set)
CTRL + S save (it is strongly recommended that you press twice during encoding to save regret when the power is down, huh, huh,
This key is applicable to most editing software)
CTRL + D search (well, if SoftICE exists, call it)
CTRL + F authentic search shortcuts
CTRL + G jump to the nth line in the file
CTRL + Shift + G cursor on a file name, Jump directly to the specified file
CTRL + H replace
CTRL + j, k # ifdef... # endif search for pairing
CTRL + l cut a row
CTRL +} matching parentheses (),{}
Common debugging
Shift + F9 quickwatch, and display the variable value at the location of the mark
Alt + 3 Watch viewing window
Alt + 4 variables monitoring variables (commonly used)
Alt + 5 display register
Alt + 6 Display memory (commonly used)
Alt + 7 shows the stack situation (when the machine is more look)
Alt + 8 display assembly code
There are also some common
CTRL + TAB to switch the Open File View (if you press Ctrl, switch backward)
CTRL + Shift + TAB switch the Open File View (if you press Ctrl, switch forward in sequence)
After the tab is selected, a tab is removed,
Shift + TAB after selection, the entire forward a tab,
Alt + 0 move focus to workspace (ESC back to editing area)
Alt + 2 move focus to output area (ESC back to edit area)
CTRL + pgup switch work area view in reverse order
CTRL + pgdn switch work area view sequentially
In addition, VC does not set the shortcut keys for opening, closing the workspace, and opening and closing the output area. If it is inconvenient,
You can register it by yourself (I set Ctrl +, and CTRL + /).
Register with tools> customize => keyboard