请教各位高手,怎么实现调用CHM帮助的时候,能定位到与当前运行程序功能模块对应的帮助页面,解决立即给分 请教各位高手,怎么实现调用CHM帮助的时候,能定位到与当前运行程序功能模块对应的帮助页面,解决立即给分 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这有: http://dev.csdn.net/Develop/article/18/18116.shtm上下文关联的chm帮助 在Delphi中实现上下文关联的chm帮助,可以调用Windows系统目录System32下的HHCTRL.OCX控件中的HtmlHelpA函数实现。 需要以下几个步骤: 1 设置相关控件的HelpContext属性。 例,主窗体frmMain::10100 ,其中的文本框 edtInput:10101 对话框dlgReport:10200 ,其中的组合列表框 cbReportEdit:10201 2 声明HtmlHelpA函数 function HtmlHelpA (hwndcaller:Longint; lpHelpFile:string; wCommand:Longint;dwData:string): HWND;stdcall; external 'hhctrl.ocx' 3 F1按键响应 //公用函数ShowChmHelp显示不同帮助画面。procedure ShowChmHelp(sTopic:string); var i:integer;begin i:=HtmlHelpA(Application.Handle,Pchar(ExePath+'\help.chm’),HH_DISPLAY_TOPIC,sTopic); if i=0 then begin Showmessage(' help.chm 帮助文件损坏!'); exit; end;end;….function TfrmMain.FormHelp(Command: Word; Data: Integer; var CallHelp: Boolean): Boolean;begin case Data of 10100: ShowChmHelp(frmMain.htm); 10101: ShowChmHelp('edtInput.htm');… else ShowChmHelp(default.htm'); end;end;function TdlgReport.FormHelp(Command: Word; Data: Integer; var CallHelp: Boolean): Boolean;begin case Data of 10200: ShowChmHelp('dlgReport.htm');10201: ShowChmHelp(cbReportEdit.htm');… else ShowChmHelp(default.htm'); end;end;这样,通过不同窗体的FormHelp事件,就可以实现帮助的关联。 定位到某个页面的方法我不是说了吗?mk:@MSITStore:D:\Program%20Files\dfw\dfwbbs.chm::/125/1255808.htm --这是文件名 --这是要定位到的页面你可以设置Form.HelpKeyWord为要定位到的页面在OnKeyDown事件中:WinExec(PChar('hh.exe mk:@MSITStore:help.chm::/'+ Application.MainForm.HelpKeyWord), SW_SHOWMAXIMIZED); WinExec('hh.exe mk:@MSITStore:D:\Program%20Files\dfw\dfwbbs.chm::/125/1255808.htm', SW_SHOW);在CHM的页面内容上按右键-属性可以看到字符串“mk:@MSITStore:D:\Program%20Files\dfw\dfwbbs.chm::/125/1255808.htm” HtmlHelpA(GetDesktopWindow(), 'E:\help.chm::/aa.htm>main', 1, ''); Jedi上面的HTMLHELP都放了几年了 ”Jedi上面的HTMLHELP都放了几年了“Jedi指的是什么啊,请指教,谢谢 为什么会有这样的连接啊?125/1255808.htm是做CHM的时候将网页以数字命名吗 quickreport如何安装,怎样判断是否已经安装好 数据库修改... 如何在delphi中使用OCX控件? Delphi比较烦!!! 问个最菜的问题:如何安装控件? 好消息!软件代码与版权出售后!一次性转让! 我知道一个COM组件的 .tlb文件,那怎么样调用这个COM组件呢? 有谁知道播放realplay格式的delphi控件? 拷贝文件时能否调用系统的那个对话框(显示拷贝进度的)?? [100]******SDN离线数据库转CHM程序即将发布!!!!! idftp.put支持长文件名吗? 半价出售编程书
上下文关联的chm帮助 在Delphi中实现上下文关联的chm帮助,可以调用Windows系统目录System32下的HHCTRL.OCX控件中的HtmlHelpA函数实现。 需要以下几个步骤: 1 设置相关控件的HelpContext属性。 例,主窗体frmMain::10100 ,其中的文本框 edtInput:10101 对话框dlgReport:10200 ,其中的组合列表框 cbReportEdit:10201 2 声明HtmlHelpA函数 function HtmlHelpA (hwndcaller:Longint; lpHelpFile:string; wCommand:Longint;dwData:string): HWND;stdcall; external 'hhctrl.ocx' 3 F1按键响应 //公用函数ShowChmHelp显示不同帮助画面。procedure ShowChmHelp(sTopic:string); var i:integer;begin i:=HtmlHelpA(Application.Handle,Pchar(ExePath+'\help.chm’),HH_DISPLAY_TOPIC,sTopic); if i=0 then begin Showmessage(' help.chm 帮助文件损坏!'); exit; end;end;….function TfrmMain.FormHelp(Command: Word; Data: Integer; var CallHelp: Boolean): Boolean;begin case Data of 10100: ShowChmHelp(frmMain.htm); 10101: ShowChmHelp('edtInput.htm');… else ShowChmHelp(default.htm'); end;end;function TdlgReport.FormHelp(Command: Word; Data: Integer; var CallHelp: Boolean): Boolean;begin case Data of 10200: ShowChmHelp('dlgReport.htm');10201: ShowChmHelp(cbReportEdit.htm');… else ShowChmHelp(default.htm'); end;end;这样,通过不同窗体的FormHelp事件,就可以实现帮助的关联。
mk:@MSITStore:D:\Program%20Files\dfw\dfwbbs.chm::/125/1255808.htm
--这是文件名 --这是要定位到的页面你可以设置Form.HelpKeyWord为要定位到的页面
在OnKeyDown事件中:
WinExec(PChar('hh.exe mk:@MSITStore:help.chm::/'+ Application.MainForm.HelpKeyWord), SW_SHOWMAXIMIZED);
在CHM的页面内容上按右键-属性可以看到字符串“mk:@MSITStore:D:\Program%20Files\dfw\dfwbbs.chm::/125/1255808.htm”
Jedi指的是什么啊,请指教,谢谢
是做CHM的时候将网页以数字命名吗