VC studio tips Wensentang (vcmfc) |
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 piece of messy source code |
Select the source code and 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 and 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 <FILENAME. h>: indicates to compile the file to the VC system directory. Use # include "filename. H" to find the file 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 |
. Opt |
The parameter file of the project about the development environment. Such as the tool bar position and other information; |
. APS |
(Appstudio file), Resource auxiliary file, binary format, usually do not care about it. |
. CLW |
Classwizard information file is actually an 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 |
It is used to compile information files. 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 |
It is used to browse project information. If source Brower is used, this file must be available. If this function is not used, you can remove generate browse info file in project options to speed up compilation. |
. Map |
Is the image information record file of the execution file, unless 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 |
It is generated only when the DLL is compiled, and some information in the DLL file is recorded. This is generally useless. |
. NCB |
No compile browser is compiled ). You can delete this file when the Automatic completion function fails. It is automatically generated after build. |
|