让VC不再编译帮助文件的方法

VC不再编译帮助文件的方法

 

VC帮助虽然很好,但有时很烦,每一次编译都会自动编译帮助文件,不理我们有没有修改过RTF文件,耗神又耗时间,实在让人烦。

怎么弄掉这帮助呢?上网上去问,没人回答。在Project Settings里找,也没找到。Google里搜,也没搜到。一开始我怀疑是MakeHelp.bat,还真去解决掉他,编译时也没发现什么大问题,还高兴地上了论坛发表自己的见解。但不好的是,网友demetry发短信告诉我这方法不行,他试了。真的不行,我一开始不信,明明我试了是可以的呀,怎么到他手上就不行了呢?不信他的,发信说他是不是操作错了。过了一一天,他发信来了,来了一句你在仔细试一下。我已经试过很多次。你这个方法不行。我仔细地试了一下,汗颜,真的不行。

仔细找了一下,项目文件里没什么特别的文件,但有一个DSP文件,用记事本打开此文件仔细看一下,发现有三个地方是用于处理帮助文件的编译的。祸根正是由这三段代码产生,下面我们一起来来铲除祸根。

祸根一、Making help file...

SOURCE=./hlp/Test.hpj

 

!IF  "$(CFG)" == "Test - Win32 Release"

 

# PROP Ignore_Default_Tool 1

USERDEP__TEST_=hlp/AfxCore.rtf    hlp/AfxPrint.rtf      hlp/$(TargetName).hm

# Begin Custom Build - Making help file...

OutDir=./Release

TargetName=Test

InputPath=./hlp/Test.hpj

InputName=Test

 

"$(OutDir)/$(InputName).hlp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

       start /wait hcw /C /E /M "hlp/$(InputName).hpj"

       if errorlevel 1 goto :Error

       if not exist "hlp/$(InputName).hlp" goto :Error

       copy "hlp/$(InputName).hlp" $(OutDir)

       goto :done

       :Error

       echo hlp/$(InputName).hpj(1) : error:

       type "hlp/$(InputName).log"

       :done

      

# End Custom Build

 

!ELSEIF  "$(CFG)" == "Test - Win32 Debug"

 

# PROP Ignore_Default_Tool 1

USERDEP__TEST_=hlp/AfxCore.rtf    hlp/AfxPrint.rtf      hlp/$(TargetName).hm

# Begin Custom Build - Making help file...

OutDir=./Debug

TargetName=Test

InputPath=./hlp/Test.hpj

InputName=Test

 

"$(OutDir)/$(InputName).hlp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

       start /wait hcw /C /E /M "hlp/$(InputName).hpj"

       if errorlevel 1 goto :Error

       if not exist "hlp/$(InputName).hlp" goto :Error

       copy "hlp/$(InputName).hlp" $(OutDir)

       goto :done

       :Error

       echo hlp/$(InputName).hpj(1) : error:

       type "hlp/$(InputName).log"

       :done

      

# End Custom Build

 

!ENDIF

 

# End Source File

# Begin Source File

 

把此段代码用以下代码替换它,或者干脆删掉它。

SOURCE=./hlp/Test.hpj

# End Source File

# Begin Source File

 

祸根二、Making help include file...

SOURCE=./Resource.h

 

!IF  "$(CFG)" == "Test - Win32 Release"

 

# PROP Ignore_Default_Tool 1

# Begin Custom Build - Making help include file...

TargetName=Test

InputPath=./Resource.h

 

"hlp/$(TargetName).hm" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

       echo. >"hlp/$(TargetName).hm"

       echo // Commands (ID_* and IDM_*) >>"hlp/$(TargetName).hm"

       makehm ID_,HID_,0x10000 IDM_,HIDM_,0x10000 resource.h >>"hlp/$(TargetName).hm"

       echo. >>"hlp/$(TargetName).hm"

       echo // Prompts (IDP_*) >>"hlp/$(TargetName).hm"

       makehm IDP_,HIDP_,0x30000 resource.h >>"hlp/$(TargetName).hm"

       echo. >>"hlp/$(TargetName).hm"

       echo // Resources (IDR_*) >>"hlp/$(TargetName).hm"

       makehm IDR_,HIDR_,0x20000 resource.h >>"hlp/$(TargetName).hm"

       echo. >>"hlp/$(TargetName).hm"

       echo // Dialogs (IDD_*) >>"hlp/$(TargetName).hm"

       makehm IDD_,HIDD_,0x20000 resource.h >>"hlp/$(TargetName).hm"

       echo. >>"hlp/$(TargetName).hm"

       echo // Frame Controls (IDW_*) >>"hlp/$(TargetName).hm"

       makehm IDW_,HIDW_,0x50000 resource.h >>"hlp/$(TargetName).hm"

      

# End Custom Build

 

!ELSEIF  "$(CFG)" == "Test - Win32 Debug"

 

# PROP Ignore_Default_Tool 1

# Begin Custom Build - Making help include file...

TargetName=Test

InputPath=./Resource.h

 

"hlp/$(TargetName).hm" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

       echo. >"hlp/$(TargetName).hm"

       echo // Commands (ID_* and IDM_*) >>"hlp/$(TargetName).hm"

       makehm ID_,HID_,0x10000 IDM_,HIDM_,0x10000 resource.h >>"hlp/$(TargetName).hm"

       echo. >>"hlp/$(TargetName).hm"

       echo // Prompts (IDP_*) >>"hlp/$(TargetName).hm"

       makehm IDP_,HIDP_,0x30000 resource.h >>"hlp/$(TargetName).hm"

       echo. >>"hlp/$(TargetName).hm"

       echo // Resources (IDR_*) >>"hlp/$(TargetName).hm"

       makehm IDR_,HIDR_,0x20000 resource.h >>"hlp/$(TargetName).hm"

       echo. >>"hlp/$(TargetName).hm"

       echo // Dialogs (IDD_*) >>"hlp/$(TargetName).hm"

       makehm IDD_,HIDD_,0x20000 resource.h >>"hlp/$(TargetName).hm"

       echo. >>"hlp/$(TargetName).hm"

       echo // Frame Controls (IDW_*) >>"hlp/$(TargetName).hm"

       makehm IDW_,HIDW_,0x50000 resource.h >>"hlp/$(TargetName).hm"

      

# End Custom Build

 

!ENDIF

 

# End Source File

# Begin Source File

把上面这段代码用以下内容替换它,千万别删了。

SOURCE=./Resource.h

# End Source File

# Begin Source File

 

祸根三、Copying contents file...

SOURCE=./hlp/Test.cnt

 

!IF  "$(CFG)" == "Test - Win32 Release"

 

# PROP Ignore_Default_Tool 1

# Begin Custom Build - Copying contents file...

OutDir=./Release

InputPath=./hlp/Test.cnt

InputName=Test

 

"$(OutDir)/$(InputName).cnt" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

       copy "hlp/$(InputName).cnt" $(OutDir)

 

# End Custom Build

 

!ELSEIF  "$(CFG)" == "Test - Win32 Debug"

 

# PROP Ignore_Default_Tool 1

# Begin Custom Build - Copying contents file...

OutDir=./Debug

InputPath=./hlp/Test.cnt

InputName=Test

 

"$(OutDir)/$(InputName).cnt" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"

       copy "hlp/$(InputName).cnt" $(OutDir)

 

# End Custom Build

 

!ENDIF

 

# End Source File

# End Group

# Begin Source File

把上面这段代码用以下内容替换它,最好别删了。

SOURCE=./hlp/Test.cnt

# End Source File

# End Group

# Begin Source File

 

好了,解决了,世界又恢复了清净。

在此也谢谢demetry,如何没有他的细心,可能我一直还以为自己已经解决了这问题呢。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Class Library Reference The Class Library Reference covers the classes, global functions, global variables, and macros that make up the Microsoft® Foundation Class Library, version 6.0. The class hierarchy chart details the class relationships in the class library. The Class Library Overview lists the classes in helpful categories. Use these lists to help locate a class that contains the functionality you are interested in.Visual C++ Programmer's Guide explains how to use the class library to program for Microsoft Windows NT®, Microsoft Windows® 95, and other Win32® platforms. Practical examples and techniques are supplied in the tutorials inVisual C++/MFC Tutorials. The remainder of the Class Library Reference consists of an alphabetical listing of the classes and an MFC Macros and Globals section that explains the global functions, global variables, and macros used with the class library. The individual hierarchy charts included with each class are useful for locating base classes. The Class Library Reference usually does not describe inherited member functions, inherited operators, and overridden virtual member functions. For information on these functions, refer to the base classes depicted in the hierarchy diagrams. In the alphabetical listing section, each class description includes a member summary by category, followed by alphabetical listings of member functions, overloaded operators, and data members. Public and protected class members are documented only when they are normally used in application programs or derived classes. Occasionally, private members are listed because they override a public or protected member in the base class. See the class header files for a complete listing of class members. Some C-language structures defined by Windows are so widely applicable that their descriptions have been reproduced completely in a section following the alphabetical reference. Please note that the “See Also” sections refer to Win32 API functions by prefacing them with the scope resolution operator (::), for example, ::EqualRect. More information on these functions can be found in the Win32 SDK documentation.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值