介绍VC6.0的18个实用小技巧
http://blog.csdn.net/liquanhai/article/details/4461231 1.检测程序中的括号是否匹配 把光标移动到需要检测的括号(如大括号{}、方括号[]、圆括号()和尖括号)前面,键入快捷键“Ctrl+]”。如果括号匹配正确,光标就跳到匹配的括号处,否则光标不移动,
http://blog.csdn.net/liquanhai/article/details/4461231
1.检测程序中的括号是否匹配
<p> 把光标移动到需要检测的括号(如大括号{}、方括号[]、圆括号()和尖括号)前面,键入快捷键“Ctrl+]”。如果括号匹配正确,光标就跳到匹配的括号处,否则光标不移动,并且机箱喇叭还会发出一声警告声。</p> <p> <strong>2.查看一个宏(或变量、函数)的宏定义</strong> 把光标移动到你想知道的一个宏上,就比如说最常见的DECLARE_MAP_MESSAGE上按一下F12(或右键菜单中的Go To Defition Of …),如果没有建立Browse files,会出现提示对话框,确定,然后就会跳到定义那些东西的地方。 相当可喜的是,它也可以看到Microsoft定义的系统宏,非常good.</p> <p> <strong>3.格式化一段乱七八糟的源代码</strong> 选中那段源代码,按ATL+F8。</p> <p> <strong>4.在编辑状态下发现成员变量或函数不能显示</strong> 删除该项目扩展名为.ncb文件,重新打开该项目。</p> <p> <strong>5.如何整理ClassView视图中大量的类</strong> 可以在classview 视图中右键新建文件夹(new folder),再把具有相近性质的类拖到对应的文件夹中,使整个视图看上去清晰明了.</p> <p> <strong>6.定位预处理指定</strong> 在源文件中定位光标到对称的#if, #endif,使用Ctrl+K.</p> <p> <strong>7.如何添加系统中Lib到当前项目</strong> 在Project | Settings | Link | Object/library modules:输入Lib名称,不同的Lib之间用空格格开.</p> <p> <strong>8.如何添加系统中的头文件(.h)到当前项目.</strong> #include <filename.h>,告诉编译到VC系统目录去找;使用#include "FileName.h",告诉编译在当前 目录找.</filename.h></p> <p> <strong>9.如何在Studio使用汇编调试</strong> 在WorkBench的Debugger状态下按CTRL+F7.</p> <p> <strong>10.怎样处理ClassZiard找不到的系统消息</strong> 如果要在ClassWizard中处理WM_NCHITTEST等系统消息,请在ClassWizard中Class Info页中将 Message filter改为Window就有了.</p> <p> <strong>11.如何干净的删除一个类</strong> 先从Workspace中的FileView中删除对应的.h和.cpp文件,再关闭项目,从实际的文件夹中删除对应的.h和.cpp文件与.clw文件。</p> <p> <strong>12.在Studio中快速切换两个文件</strong> 有时,我们需要在最近使用的两个文件中快速切换,换Ctrl+F6。这在两个文件不相今的时候就有用的.</p> <p><strong>13.取得源程序预处理后的结果:</strong> 在Studio里,可以在->PROJECT->SETTINGS->C/C++->Project Options中,在最后加上 /P /EP这两个编译开关即可做到"只进行预处理".就可以了。编译以后就可以在源程序目录中发现“文件名.I ”的文本文件。这就是预处理后的结果。 (注意注:区分大小定,请用大定/P)</p> <p> <strong>14.在Debug模式中查看WINAPI调用后的返回值:</strong> 很简单,且实用:在watch中加入@hr,err。在CSDN的文档中心有一篇讲得更细,请参考。</p> <p> <strong>15.产生指定源程序文件的汇编代码:</strong> 从IDE菜单的Project->Setting打开项目设置,按如下文件做: 1.先在左边选择指定文件,可以多选。 2. 在右边的C++属性页中,在category中选择List Files,接着在下面的List Files Type中选择Assembly and source code(或选择其它),最后在List File Name中输入在个C/C++源文件产生的相应的汇编代码的文件。 3.编译整个工程。</p> <p> <strong>16.手工编译纯资源成dll:</strong> Rc.exe /v data.rc Cvtres.exe /machine:ix86 data.res Link /SUBSYSTEM:WINDOWS /DLL /NOENTRY data.res ;编译成DLL文件 这种方式创建的DLL是最小的,比起你用Win 32 Dynamic Libray等产生的更小。</p> <p><strong>17:怎样快速生成一个与现有项目除了项目名外完全相同的新项目?</strong></p> <p>利用File菜单下生成新项目中的Custom AppWizard ,选择 An existing Project ,然后选择现有项目的项目文件名(*.dsp)Finish,编译后就生成一个可以生成与现有项目相同但可以重新取名的项目的AppWizard。你可以象用MFC AppWizard一样用它。如果不想用了,可以在VC 安装目录下Common/MSDev98/Template目录中删除该Wizard中.awx和 .pdb文件。 </p> <p><strong>18:如果想把整个项目拷贝到软盘,那些文件可以删掉? </strong></p> <p> 除了项目文件夹中debug文件夹可以删除外,.ncb,.clw,.opt 等文件也可以删除,这些文件Rebuilt all后可以重新生成。 </p> <p> 附:VC项目文件说明 .dsp 项目参数配置文件,这个文件太重要,重点保护对象。. .dsw 工作区文件,重要性一般,因为它信息不我,容易恢复。 以下文件在项目中是可丢弃的,有些文件删除后,VC会自动生成的。 .clw ClassWizard信息文件,实际上是INI文件的格式,有兴趣可以研究一下.有时候ClassWizard出问题,手工修改CLW文件可以解决.如果此文件不存在的话,每次用ClassWizard的时候绘提示你是否重建. .ncb 无编译浏览文件(no compile browser)。当自动完成功能出问题时可以删除此文件。build后会自动生成。 .opt 工程关于开发环境的参数文件。如工具条位置等信息;(可丢弃) .aps (AppStudio File),资源辅助文件,二进制格式,一般不用去管他. .plg 是编译信息文件,编译时的error和warning信息文件(实际上是一个html文件),一般用处不大.在Tools->Options里面有个选项可以控制这个文件的生成. .hpj (Help Project)是生成帮助文件的工程,用microsfot Help Compiler可以处理. .mdp (Microsoft DevStudio Project)是旧版本的项目文件,如果要打开此文件的话,会提示你是否转换成新的DSP格式. .bsc 是用于浏览项目信息的,如果用Source Brower的话就必须有这个文件.如果不用这个功能的话,可以在Project Options里面去掉Generate Browse Info File,可以加快编译速度. .map 是执行文件的映像信息纪录文件,除非对系统底层非常熟悉,这个文件一般用不着. .pch (Pre-Compiled File)是预编译文件,可以加快编译速度,但是文件非常大. .pdb (Program Database)记录了程序有关的一些数据和调试信息,在调试的时候可能有用. .exp 只有在编译DLL的时候才会生成,记录了DLL文件中的一些信息.一般也没什么用.</p>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Practical tips for converting full-width English letters into half-width forms. In modern life, we often come into contact with English letters, and we often need to input English letters when using computers, mobile phones and other devices. However, sometimes we encounter full-width English letters, and we need to use the half-width form. So, how to convert full-width English letters to half-width form? Here are some practical tips for you. First of all, full-width English letters and numbers refer to characters that occupy a full-width position in the input method, while half-width English letters and numbers occupy a full-width position.

Win11 Tips Sharing: One trick to skip Microsoft account login Windows 11 is the latest operating system launched by Microsoft, with a new design style and many practical functions. However, for some users, having to log in to their Microsoft account every time they boot up the system can be a bit annoying. If you are one of them, you might as well try the following tips, which will allow you to skip logging in with a Microsoft account and enter the desktop interface directly. First, we need to create a local account in the system to log in instead of a Microsoft account. The advantage of doing this is

We often create and edit tables in excel, but as a novice who has just come into contact with the software, how to use excel to create tables is not as easy as it is for us. Below, we will conduct some drills on some steps of table creation that novices, that is, beginners, need to master. We hope it will be helpful to those in need. A sample form for beginners is shown below: Let’s see how to complete it! 1. There are two methods to create a new excel document. You can right-click the mouse on a blank location on the [Desktop] - [New] - [xls] file. You can also [Start]-[All Programs]-[Microsoft Office]-[Microsoft Excel 20**] 2. Double-click our new ex

VSCode (Visual Studio Code) is an open source code editor developed by Microsoft. It has powerful functions and rich plug-in support, making it one of the preferred tools for developers. This article will provide an introductory guide for beginners to help them quickly master the skills of using VSCode. In this article, we will introduce how to install VSCode, basic editing operations, shortcut keys, plug-in installation, etc., and provide readers with specific code examples. 1. Install VSCode first, we need

In C language, it represents a pointer, which stores the address of other variables; & represents the address operator, which returns the memory address of a variable. Tips for using pointers include defining pointers, dereferencing pointers, and ensuring that pointers point to valid addresses; tips for using address operators & include obtaining variable addresses, and returning the address of the first element of the array when obtaining the address of an array element. A practical example demonstrating the use of pointer and address operators to reverse a string.

In Hua Yishan Heart Moon, Lu Shu is an SSR celebrity. He is positioned as a single-target backline player and has a very impressive critical hit rate. Many players don’t know much about Lu Shu. Here’s what I’ve brought you. Come and take a look at the introduction to the skills and attributes of Hua Yishan Heart of the Moon Lu Shu. Celebrity Attributes Celebrity Skills 1. Lu Ming Shuzhong Skill Description: Lu Shu was born in Qiongqihui in Shuzhong. He has practiced martial arts since he was a child and has outstanding martial arts skills. Causes basic attack damage equal to 100% of the enemy's back row attack power, and reduces the target's rage by 10 points. Skill attributes: Level 2: Basic attack damage increased to 105%. Level 2: Basic attack damage is increased to 110%, and the target's rage is reduced by 15 points. Level 2: Basic attack damage increased to 115%. Level 2: Basic attack damage is increased to 120%, and the target's rage is reduced by 20 points. Level 2: Basic attack

Title: PHP Programming Tips: How to Jump to a Web Page within 3 Seconds In web development, we often encounter situations where we need to automatically jump to another page within a certain period of time. This article will introduce how to use PHP to implement programming techniques to jump to a page within 3 seconds, and provide specific code examples. First of all, the basic principle of page jump is realized through the Location field in the HTTP response header. By setting this field, the browser can automatically jump to the specified page. Below is a simple example demonstrating how to use P

Win11 tricks revealed: How to bypass Microsoft account login Recently, Microsoft launched a new operating system Windows11, which has attracted widespread attention. Compared with previous versions, Windows 11 has made many new adjustments in terms of interface design and functional improvements, but it has also caused some controversy. The most eye-catching point is that it forces users to log in to the system with a Microsoft account. For some users, they may be more accustomed to logging in with a local account and are unwilling to bind their personal information to a Microsoft account.
