18 practical tips for vc6.0

Source: Internet
Author: User

1. DetectionProgramMatching brackets
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.
Fortunately, it can also see Microsoft-defined system macros, which are very good.

3. Format a messSource code
Select the sourceCode, 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 <FILENAME. h>, which indicates that the file is compiled to the VC system directory. Use # include "filename. H" to indicate that the file is compiled in the current directory.
Directory searching.

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, Set
Change message filter to window.

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. quickly switch two files in Studio
Sometimes, we need to quickly switch between the two recently used files and change to Ctrl + F6. This is useful when two files are different.

13. Obtain the preprocessing result of the source program:
In studio
You can add/P at the end of project> Settings> C/C ++> project options.
The/EP compilation switches can achieve "only preprocessing. After compilation, you can find the text file named "file name. I" in the source program directory. This is the result after preprocessing.
(Note: use big setting/P to differentiate the size)

14. In debug mode, view the returned values after winapi call:
Simple and practical: Add @ HR and err to watch. For more details, see.

15. compile code that generates the specified source program file:
Open the Project Settings from project> setting in the IDE menu and follow the following file:
1. Select a specified file on the left. You can select multiple files.
2.
On the C ++ properties page on the right, select list files in category, and then select assembly and
Source code (or select another), and finally input the corresponding compilation code file generated in a C/C ++ source file in list file name.
3. Compile the entire project.

16. manually compile pure resources into dll:
Rc.exe/V Data. RC
Cvtres.exe/machine: ix86 data. Res
Link/subsystem: Windows/dll/noentry data. Res; compiled into a DLL file
The DLL created in this way is the smallest, which is smaller than the one generated by Win 32 dynamic libray.

17: How to quickly generate a new project with the same project name as the existing project?

Benefit
Create custom Appwizard in the new project from the File menu, and select an existing project
Select the project name (*. DSP) of the existing project to finish. After compilation, generate an Appwizard for the project that is the same as the existing project but can be renamed again. You can
Use it like using MFC Appwizard. If you do not want to use it, you can
Delete the. awx and. PDB files in the common \ msdev98 \ template directory in the installation directory.

18: If you want to copy the entire project to a floppy disk, which files can be deleted?

In addition to deleting the debug folder in the project folder, files such as. NCB,. CLW, And. Opt can also be deleted. These files can be rebuilt all and can be regenerated.

Appendix: VC project file description
. DSP project parameter configuration file, which is too important and focuses on Object protection ..
The. DSW workspace file is of average importance because it is easy to restore because it does not contain me.
the following files can be discarded in the project. After some files are deleted, the VC automatically generates them.
. 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.
. NCB does not compile the Browser file (No compile browser ). You can delete this file when the Automatic completion function fails. It is automatically generated after build.
. Opt project parameter file about the development environment. Such as the tool bar location and other information; (can be discarded)
. APS (appstudio file), Resource auxiliary file, binary format, usually do not care about it.
. 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. It 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 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. It records some information in the DLL file. it is generally useless.

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.