在VC中添加help帮助文件

函数及参数说明(具体参考MSND)

HWND HtmlHelp(HWND hwndCaller, LPCSTR pszFile, UINT uCommand, DWORD dwData);

hwndCaller
Specifies the handle of the window calling the HtmlHelp API. If the HtmlHelp API call results in messages being sent from the HTML Help window, they will be sent to this window handle.
pszFile
Specifies an HTML file, a URL, a compiled HTML file, or a window definition (preceeded with a ‘>’ character). If the command being used does not require a file or URL, this value may be NULL.
uCommand
Specifies the action to perform. See the Comments section for details.
dwData
Specifies any data that may be required based on the value of the uCommand parameter.

 在这里我们没有生成help.chm文件,以个人博客URL http://blog.csdn.net/jiazhen替代,具体如下:

    HtmlHelp(g_hWnd,"http://blog.csdn.net/jiazhen",  HH_DISPLAY_TOPIC,NULL);

注意:在系统中搜索要找到htmlhelp.h 和htmlhelp.lib分别所在的文件路径,添加到

Project settings-->C++ -->Catergory-->PreProcessor-->Addtional include files和

Project settings-->Link 的Category-->input-->Additional library path中

比较简单的方法:找到htmlhelp.h和htmlhelp.lib文件,复制到工程文件夹中,Project-->Add to Project-->files,分别将上面两个文件添加到工程中,在工程文件里加入 #include "htmlhelp.h" 。

如果不进行上面的操作可能会出现以下提示:

Cannot open include file: 'HtmlHelp.h': No such file or directory

cannot open file "./Htmlhelp.Lib"

或者编译成功,而链接出错。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

路漫漫其修远.

你的鼓励是我寻找真相的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值