Overview of VC ++ shortcut keys

Source: Internet
Author: User


1. check whether the brackets match in the program. move the cursor to the brackets to be checked (such as braces {}, square brackets [], Parentheses (), and angle brackets <>, enter the shortcut key "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) and move the cursor to the 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 piece of messy source code. Select the source code and press ATL + F8.
4. The member variables or functions cannot be displayed and deleted. The project extension is. ncb. Open the project again.
5. to sort out a large number of classes in the ClassView, right-click the classview to create a folder (new folder), and drag classes of similar properties to the corresponding folder, make the entire view clear.
6. Positioning preprocessing specifies to position the cursor in the source file to symmetric # if, # endif, Ctrl + K.
7. How to add Lib in the system to the current Project in the Project | Settings | Link | Object/library modules: Enter the Lib name, and use an empty lattice between different Lib.
8. How to add the system header file (. h) to the current project. Use # include <FileName. h> to tell the system directory to be searched for by compiling to the VC system; Use # include "FileName. h" to tell the compilation to be found in the current directory.
9. How to Use Assembly debugging in Studio and press CTRL + f7in the Debugger state of WorkBench.
10. How to Handle System messages not found by ClassZiard if
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 first deletes the corresponding class from the FileView In Workspace. h and. cpp file, close the project, and delete the corresponding. h and. cpp file and. clw file.
12. if the console application supports the mfc class library, you can include it 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 there is only executable code for the. exe file in nt, use vc open file to open the *. exe file in resources mode, modify the resource file directly, and save the file. Appendix: VC project file description. opt project parameter file about the development environment. Such as the tool bar location 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 every time you use ClassWizard .. dsp (workflow studio Project): Project file, text format, but do not modify it manually if you are not familiar with it. DSW is a Workspace file. Other features are similar to those of DSPs .. 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, using micros Fot Help Compiler can handle .. 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 .. p ** (Program Database) Records Program-related data and debugging information, which may be useful during debugging .. exp is generated only when the DLL is compiled. It records some information in the DLL file. it is useless .. n Cb 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. //
14. debugging shortcuts
Ctrl + F5 Excute the exe
Ctrl + F7 compiler
F7 Build to exe
F9 remove/insert a breakpoint
F5 start debug
F11 step
Ctrl + F10 Run to cursor
When F5 runs, it stops when it encounters a breakpoint .. (in the Win32 program, if the system does not send messages to the program, it also stops)
F9 breakpoint
F10 runs step by step and does not go into the function
F11 is also a step-by-step operation. When it comes to a function, it will go in (of course those winapis won't go in due to Dll !).
Ctrl + Space: display the list of currently available functions and members
Shift + alt + Space display the parameter information of the function at the current cursor position
Alt + O open the corresponding hfile or CPP File
Ctrl + tab switch to the recently opened file or Graph
Ctrl + D switch focus to Find in files

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.