.chm帮助问题
我做了一个帮助文档,查到资料可以用如下方法在CB中实现连接
implib hhctrl.lib hhctrl.ocx:创建HtmlHelp的库文件。
在程序中include <htmlhelp.h>
在工程中加入第一步创建的hhctrl.lib,
编译即可。
但不知道implib hhctrl.lib hhctrl.ocx:创建HtmlHelp的库文件
是什么意思
望能者告之。。。。
另外,我已经用ShellExecute()实现的同样的功能
只是,上面的方法实现不了心里有疙瘩。。。。。。
问题点数:20、回复次数:6Top
1 楼leonatcs(LeonKennedy)(时常逛一逛csdn,有益身心健康。)回复于 2005-04-30 12:49:24 得分 0
The IMPLIB utility creates import library. IMPLIB takes as input DLLs, module definition files, or both, and produces an import library as output.
If you've created a Windows application, you've already used at least one import library, IMPORT32.LIB, the import library for the standard Windows DLLs. IMPORT32.LIB is linked automatically when you build a Win32 application in the C++Builder IDE and when using BCC32 at the command line.
An import library lists some or all of the exported functions for one or more DLLs. IMPLIB creates an import library directly from DLLs or from module definition files for DLLs (or a combination of the two).
Creating an Import Library for a DLL
Options must be lowercase and preceded by either a hyphen or a slash.
Type:
IMPLIB Options LibName [ DefFiles... | DLLs... ] [@ResponseFile]
where Options is an optional list of one or more IMPLIB options, LibName is the name for the new import library, DefFiles is a list of one or more existing module definition files for one or more DLLs, and DLLs is a list of one or more existing DLLs. You must specify at least one DLL or module definition file.
You can also use a response file to list the .DEF and .DLL files that you want to process. A response file is an ACSII text file that contains a list of files. The files must be separated by either spaces or new lines in the file. To specify a response file on the command line, precede the response filename with an "at" sign (@). For example,
implib foo.lib @respon.txt
Note: A DLL can also have an extension of .EXE or .DRV, not just .DLL.
Option Description
-a Add '_' alias for cdecl functions for compatibility with Microsoft libraries
-c Warnings on case sensitive symbols
-f Force imports by name
-w No warnings.Top
2 楼leonatcs(LeonKennedy)(时常逛一逛csdn,有益身心健康。)回复于 2005-04-30 12:51:47 得分 0
用 DLLs, module definition files, or both创建import library.Top
3 楼sgaley(云的清儿)回复于 2005-08-30 11:36:19 得分 0
还是不明白,问题没有解决Top
4 楼buffoon(悠云[http://buffoon.blog.com.cn])回复于 2005-08-30 12:20:51 得分 20
implib是一个命令行工具,用来生成lib文件的
这里,先用cd转移到你自己的工程所在目录,然后
implib hhctrl.lib c:\windows\system32\hhctrl.ocx(注:WIN2000的话,应为:c:\winnt\system32\hhctrl.ocx)
接着,在工程中add这个hhctrl.lib文件
在程序中include <htmlhelp.h>
在程序中添加代码,编译即可。
在程序中的实例:
Application->HelpFile="help.chm";
HtmlHelp(
GetDesktopWindow(),
AnsiString(Application->HelpFile + "::/index.htm").c_str(),
HH_DISPLAY_TOPIC,
NULL);
Top
5 楼Waiting4you(毛毛)回复于 2005-08-30 12:53:14 得分 0
implib.exe在BCB安装文件夹的Bin子目录里,是命令行工具,用法是implib <lib文件名> <dll文件名>
implib hhctrl.lib hhctrl.ocx就是跟据hhctrl.ocx生成hhctrl.lib
用HtmlHelp有更多的控制细节,更灵活。
Top
6 楼sgaley(云的清儿)回复于 2005-08-30 12:58:04 得分 0
可以了,-_-Top




