2009年3月10日星期二

怎样在pb中用.chm的help文件

怎样在pb中用.chm的help文件

Power Builder - Windows API

Q frank:
怎样在pb中用.chm的help文件?谢谢


A回答:

以下答案摘自:http://extend.hk.hi.cn/~kjx/pbclub/0015_html.htm
写出来与大家分享:
1、定义全局API函数:
Function Long HtmlHelpA (long hwnd ,string lpHelpFile , long wCommand, string dwData) Library "hhctrl.ocx"
2、定义全局变量:
long HH_DISPLAY_TOPIC = 0
3、在功能模块的“帮助”按钮的clicked事件中写下以下代码:
htmlhelpA(handle(parent), "chm_name>chm_win_name", HH_DISPLAY_TOPIC, "htm_name")
例如:chm帮助文件的名字是help.chm,help.chm的主窗口名是mywin,要调出的相关页面是bj_modi.htm,相应的脚本是:
htmlhelpA(handle(parent), "help.chm>mywin", HH_DISPLAY_TOPIC, "bj_modi.htm")
主持人注:其中的HH_DISPLAY_TOPIC表示在指定的窗口显示一个主题(这里为bj_modi.htm)。
4、至于在菜单中启动帮助文件,用run("hh help.chm")命令即可。

此问题由PB编程俱乐部回答。

附加关键字:编程, 源程序, programming, source code, Power Builder, PB, sybase, Windows API, win32, api, windows api, gdi32, kernel。

没有评论: