F freegod21st Unregistered / Unconfirmed GUEST, unregistred user! 2003-06-01 #1 [red][/red][?]请各位专家帮帮忙<br>我做了一个chm类型的帮助文件,就是不知道如何在delphi中使用它。是不是要调用windows<br>api呀???
G gyang Unregistered / Unconfirmed GUEST, unregistred user! 2003-06-01 #2 是,要先在uses处声明ShellAPI,然后在你的代码处用这个ShellExecute<br>uses<br> ShellAPI;<br><br>ShellExecute(Handle, nil, PChar('C:/aa.chm'), nil, nil, SW_SHOWNORMAL);
是,要先在uses处声明ShellAPI,然后在你的代码处用这个ShellExecute<br>uses<br> ShellAPI;<br><br>ShellExecute(Handle, nil, PChar('C:/aa.chm'), nil, nil, SW_SHOWNORMAL);
Q quejian Unregistered / Unconfirmed GUEST, unregistred user! 2003-06-01 #3 use <br> shellapi<br><br>function HtmlHelp(hwnd: integer; pszFile: PChar; uCommand: Integer;<br> dwData: LongInt): integer; stdcall; external 'HHCtrl.ocx' name 'HtmlHelpA';<br><br>procedure TForm1.Button5Click(Sender: TObject);<br>begin<br> HtmlHelp(Application.Handle, PChar('E:/DELPHI书籍及技巧/hubdog.chm::/task/library.htm'), $0000, 0);//可以打开chm指定页面<br>end;<br>
use <br> shellapi<br><br>function HtmlHelp(hwnd: integer; pszFile: PChar; uCommand: Integer;<br> dwData: LongInt): integer; stdcall; external 'HHCtrl.ocx' name 'HtmlHelpA';<br><br>procedure TForm1.Button5Click(Sender: TObject);<br>begin<br> HtmlHelp(Application.Handle, PChar('E:/DELPHI书籍及技巧/hubdog.chm::/task/library.htm'), $0000, 0);//可以打开chm指定页面<br>end;<br>
F freegod21st Unregistered / Unconfirmed GUEST, unregistred user! 2003-06-01 #5 谢谢大家了<br>我试试看,我才刚接触delphi,很多东西不懂。以后还要大家多多帮助!<br>
刀 刀剑如梦 Unregistered / Unconfirmed GUEST, unregistred user! 2003-06-02 #6 To quejian:<br> 向你学习,你的做法值得提倡的呀!每个问题都有不同的思维方式。
Z zengtao Unregistered / Unconfirmed GUEST, unregistred user! 2003-06-03 #7 用下面这个过程就可以了很简单的:<br>procedure DisplayHelp(HtmlName: String);<br>var<br> URL: string;<br> DirName:String;<br>begin<br> DirName := extractfilepath(application.ExeName);<br> URL:=DirName+ 'Helpfile/CETSoftHelp.chm';<br> HtmlHelp(0,PChar(URL),HH_DISPLAY_TOPIC,0);<br>end;
用下面这个过程就可以了很简单的:<br>procedure DisplayHelp(HtmlName: String);<br>var<br> URL: string;<br> DirName:String;<br>begin<br> DirName := extractfilepath(application.ExeName);<br> URL:=DirName+ 'Helpfile/CETSoftHelp.chm';<br> HtmlHelp(0,PChar(URL),HH_DISPLAY_TOPIC,0);<br>end;