真的没有人知道 hha.dll , hhc.exe 的调用函数吗?一个关于帮助文件制作的问题 (50分)

M

mt

Unregistered / Unconfirmed
GUEST, unregistred user!
我在不少帮助文件制作软件中均带有[hha.dll , itcc.dll , hhc.exe]<br>想向大家求教如何利用以上文件制作帮助软件,最好有详细的api函数调用<br>方法或列表?
 
你直接做成HTML的不就结了。
 
我指的是我要编一个 制作帮助文件的 软件
 
我有html help workshop的软件和使用手册,可以编译成htm的格式<br>其他的我也有使用手册<br>给我个地址,我传上去<br>yangxiao_jiang@download-city.com
 
www.playicq.com
 
谢谢你 我的 email: mt725@163.com
 
帮助制作只用hha.dll和hhc.exe就可以,用命令行hhc hhp文件 &nbsp;就可以了
 
zjfeng你好<br>谢谢您的帮助,可不可以说具体一些!
 
我原来做过一个将从网上收集的html文件合成为一个chm文件的程序,自己用了一下,感觉还可以<br>你可以试一下。部分代码如下:<br>procedure TMainForm.CreateListFile; //建立目录文件<br>var<br>&nbsp; I:integer;<br>Begin<br>ListFile:=CurrentDir + 'ListFile.html';<br>AssignFile(FList, ListFile);<br>Rewrite(FList);<br>Writeln(FList, '&lt;html&gt;');<br>Writeln(FList, '&lt;head&gt;');<br>Writeln(FList, '&lt;title&gt;目录&lt;/title&gt;');<br>Writeln(FList, '&lt;meta http-equiv="Content-Type" content="text/html; charset=gb2312"&gt;');<br>Writeln(FList, '&lt;/head&gt;');<br>Writeln(FList, '');<br>Writeln(FList, '&lt;body bgcolor="#FFFFFF"&gt;');<br>Writeln(FList, '&lt;h1 align="center"&gt;&lt;font face="Verdana, Arial, Helvetica, sans-serif"&gt;&lt;b&gt;目录&lt;/b&gt;&lt;/font&gt;&lt;/h1&gt;');<br>Writeln(FList, '&lt;hr width="100%" color="red" noshade&gt;');<br>Writeln(FList, '');<br>for I:=0 to FileList.Items.Count-1 do<br>Writeln(FList, '&lt;p&gt;&lt;a href="file:///' + FileList.Items.Strings+'"&gt;'+ FindTitle(FileList.Items.Strings)+'&lt;/a&gt; &lt;/p&gt;');<br>Writeln(FList, '');<br>Writeln(FList, '&lt;hr width="100%" color="blue" noshade&gt;');<br>Writeln(FList, '&lt;/body&gt;');<br>Writeln(FList, '&lt;/html&gt;');<br>CloseFile(FList);<br>end;<br><br>procedure TMainForm.CreateVersionFile; //建立版权文件<br>begin<br>VersionFile:=CurrentDir + 'VerSionFile.html';<br>AssignFile(FVerSion, VersionFile);<br>Rewrite(FVerSion);<br>Writeln(FVerSion, '&lt;html&gt;');<br>Writeln(FVerSion, '&lt;head&gt;');<br>Writeln(FVerSion, '&lt;title&gt;版权页面&lt;/title&gt;');<br>Writeln(FVerSion, '&lt;meta http-equiv="Content-Type" content="text/html; charset=gb2312"&gt;');<br>Writeln(FVerSion, '&lt;/head&gt;');<br>Writeln(FVerSion, '');<br>Writeln(FVerSion, '&lt;body bgcolor="#000000" text="#FFFF99"&gt;');<br>Writeln(FVerSion, '&lt;h1 align="center"&gt;CHM文件制作系统 &lt;/h1&gt;');<br>Writeln(FVerSion, '&lt;hr&gt;');<br>Writeln(FVerSion, '&lt;p&gt;作者:汪涛&lt;/p&gt;');<br>Writeln(FVerSion, '&lt;p&gt;E-mail: &lt;a href="mailto:waterman@sina.com"&gt;waterman@sina.com&lt;/a&gt;&lt;/p&gt;');<br>Writeln(FVerSion, '&lt;/body&gt;');<br>Writeln(FVerSion, '&lt;/html&gt;');<br>CloseFile(FVerSion);<br>end;<br><br>procedure TMainForm.Createhhp; &nbsp;//产生项目文件<br>var<br>&nbsp; I:integer;<br>begin<br>AssignFile(Fproject, hhpFile);<br>Rewrite(Fproject);<br>writeln(Fproject, '[OPTIONS]');<br>writeln(Fproject, 'Compatibility=1.1');<br>writeln(Fproject, 'Compiled file=' + ChmFile);<br>writeln(Fproject, 'Contents file=' + hhcFile);<br>writeln(Fproject, 'Default Window=' + WindowName);<br>writeln(Fproject, 'Default topic='+ ListFile);<br>writeln(Fproject, 'Display compile progress=no');<br>writeln(Fproject, 'Full-text search=Yes');<br>writeln(Fproject, 'Language=0x804 中文(中国)');<br>writeln(Fproject, '');<br>writeln(Fproject, '');<br>writeln(Fproject, '[WINDOWS]');<br>writeln(Fproject, WindowName + '="'+ WindowTitle +'","' + hhcFile + '",,,,,,,,0x2520,,0x307e,,,,,,,,');<br>writeln(Fproject, '');<br>writeln(Fproject, '');<br>writeln(Fproject, '[FILES]');<br>&nbsp; For I:=0 to FileList.Items.Count-1 do<br>writeln(Fproject, FileList.Items.Strings);<br>writeln(Fproject, ListFile);<br>writeln(Fproject, VersionFile);<br>closefile(Fproject);<br>end;<br><br><br>procedure TMainForm.Createhhc; //产生目录文件<br>var &nbsp; I:integer;<br>begin<br>AssignFile(Fcontent, hhcFile);<br>Rewrite(Fcontent);<br>writeln(Fcontent, '&lt;!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"&gt;');<br>writeln(Fcontent, '&lt;HTML&gt;');<br>writeln(Fcontent, '&lt;HEAD&gt;');<br>writeln(Fcontent, '&lt;meta name="GENERATOR" content="Microsoft&amp;reg; HTML Help Workshop 4.1"&gt;');<br>writeln(Fcontent, '&lt;!-- Sitemap 1.0 --&gt;');<br>writeln(Fcontent, '&lt;/HEAD&gt;&lt;BODY&gt;');<br>writeln(Fcontent, '&lt;OBJECT type="text/site properties"&gt;');<br>writeln(Fcontent, ' &lt;param name="Window Styles" value="0x1222"&gt;');<br>writeln(Fcontent, ' &lt;param name="ImageType" value="Folder"&gt;');<br>writeln(Fcontent, '&lt;/OBJECT&gt;');<br>writeln(Fcontent, '&lt;UL&gt;');<br>writeln(Fcontent, ' &lt;LI&gt; &lt;OBJECT type="text/sitemap"&gt;');<br>writeln(Fcontent, ' &lt;param name="Name" value="目录"&gt;');<br>writeln(Fcontent, ' &lt;param name="Local" value="'+listFile+'"&gt;');<br>writeln(Fcontent, ' &lt;param name="ImageNumber" value="1"&gt;');<br>writeln(Fcontent, ' &lt;/OBJECT&gt;');<br>writeln(Fcontent, ' &lt;UL&gt;');<br><br>for I:=0 to FileList.Items.count-1 do<br>begin<br>writeln(Fcontent, ' &lt;LI&gt; &lt;OBJECT type="text/sitemap"&gt;');<br>writeln(Fcontent, ' &lt;param name="Name" value="'+ FindTitle(FileList.Items.Strings) + '"&gt;');<br>writeln(Fcontent, ' &lt;param name="Local" value="'+ ExtractFileName(FileList.Items.Strings) + '"&gt;');<br>writeln(Fcontent, ' &lt;/OBJECT&gt;');<br>end;<br><br>writeln(Fcontent, ' &lt;LI&gt; &lt;OBJECT type="text/sitemap"&gt;');<br>writeln(Fcontent, ' &lt;param name="Name" value="Author"&gt;');<br>writeln(Fcontent, ' &lt;param name="Local" value="'+ VersionFile + '"&gt;');<br>writeln(Fcontent, ' &lt;/OBJECT&gt;');<br>writeln(Fcontent, ' &lt;/UL&gt;');<br>writeln(Fcontent, '&lt;/UL&gt;');<br>writeln(Fcontent, '&lt;/BODY&gt;&lt;/HTML&gt;');<br>closeFile(Fcontent);<br>end;<br><br><br>procedure TMainForm.BtnCompileClick(Sender: TObject); &nbsp;//编译文件<br>var<br>&nbsp; &nbsp;StartupInfo:TStartupInfo;<br>&nbsp; &nbsp;ProcessInfo:TProcessInformation;<br>begin<br><br>if FileList.Items.count=0 then &nbsp;begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Showmessage('请添加要编译的文件');<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;<br><br>if TextFileName.text&lt;&gt;'' &nbsp;then chmFile:=TextFileName.Text<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Showmessage('请输入您希望编译后生成的文件名');<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;exit;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;<br><br>if TextWindowTitle.Text&lt;&gt;'' &nbsp;then begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WindowTitle:=TextWindowTitle.Text;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WindowName:=TextWindowTitle.Text;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Showmessage('请输入窗口标题');<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;<br><br>hhpFile:=ChangeFileExt(chmFile, '.hhp');<br>hhcFile:=ChangeFileExt(chmFile, '.hhc');<br><br>TempHhpFile:=TempDir + ExtractFileName(hhpFile);<br>TempChmFile:=TempDir + ExtractFileName(chmFile);<br><br>BtnCompile.Enabled:=false;<br>BtnClose.Enabled:=false;<br><br>ImageActive.Visible:=True;<br>Label4.Visible:=True;<br>Label4.Caption:='正在编译…';<br><br>CreateListFile; &nbsp; &nbsp;//建立目录页面<br>CreateVersionFile; //建立版权页面<br>Createhhp; &nbsp; &nbsp; &nbsp; &nbsp; //建立项目文件<br>Createhhc; &nbsp; &nbsp; &nbsp; &nbsp; //建立目录文件<br><br>MkDir(TempDir); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //在C根目录下建立新的临时子目录<br>RenameFile(hhpfile, TempHhpFile); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //建立临时项目文件<br><br>ShellExec('open','hhc.exe',Pchar(temphhpfile),Pchar(currentdir),0,true);<br><br>if FileExists(hhpFile) then DeleteFile(hhpFile);<br>RenameFile(TempHhpFile, hhpFile); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //恢复项目文件<br>RmDir(TempDir); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //删除临时目录<br><br>if KeepTempFile.Checked=False<br>then begin if FileExists(hhpFile) then DeleteFile(hhpFile);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if FileExists(hhcFile) then DeleteFile(hhcFile);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if FileExists(ListFile) then DeleteFile(ListFile);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if FileExists(VersionFile) then DeleteFile(VersionFile);<br>&nbsp; &nbsp; &nbsp;end;<br>&nbsp; &nbsp; //删除临时文件:项目文件、目录文件、目录文件、版权文件<br><br>ImageActive.Visible:=False;<br>Label4.Caption:='编译完成';<br><br>if Display.Checked=True then<br>&nbsp; &nbsp;ShellExecute(handle, nil, Pchar(chmFile), nil, nil, 1);<br>&nbsp; &nbsp; //显示最终文件<br>BtnCompile.Enabled:=true;<br>BtnClose.Enabled:=True;<br>end;<br><br><br>function tMainForm.WinExecAndWait32(FileName:String; Visibility :integer):Dword;<br>&nbsp; &nbsp; &nbsp; {执行一个外部程序并等待其结束}<br>var<br>zAppName:array[0..512] of char;<br>zCurDir:array[0..255] of char;<br>WorkDir:String;<br>StartupInfo:TStartupInfo;<br>ProcessInfo:TProcessInformation;<br><br>begin<br>StrPCopy(zAppName,FileName);<br>GetDir(0,WorkDir);<br>StrPCopy(zCurDir,WorkDir);<br>FillChar(StartupInfo,Sizeof(StartupInfo),#0);<br>StartupInfo.cb := Sizeof(StartupInfo);<br>StartupInfo.dwFlags := STARTF_USESHOWWINDOW;<br>StartupInfo.wShowWindow := Visibility;<br>if not CreateProcess(nil,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zAppName, { pointer to command line string }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nil, { pointer to process security attributes }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nil, { pointer to thread security attributes }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;false, { handle inheritance flag }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CREATE_NEW_CONSOLE or { creation flags } NORMAL_PRIORITY_CLASS,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nil, { pointer to new environment block }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nil, { pointer to current directory name }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;StartupInfo, { pointer to STARTUPINFO }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ProcessInfo)<br>then Result := 1 { pointer to PROCESS_INF }<br>else begin<br>&nbsp; &nbsp; &nbsp;while WaitforSingleObject(ProcessInfo.hProcess,10)=WAIT_TIMEOUT<br>&nbsp; &nbsp; &nbsp;do Application.ProcessMessages;<br>&nbsp; &nbsp; &nbsp;GetExitCodeProcess(ProcessInfo.hProcess,Result);<br>&nbsp; &nbsp; &nbsp;end;<br>end;
 
watter:<br>你的不完全呀,还有:ShellExec是哪儿来的?我找了API中没有呀,如果是ShellExecute那参数又不对呀?
 
uses shellapi
 
我试了,不过SHELLAPI里只有ShellExecute。没有ShellExec
 
那是他写了自己的函数,你用原来的就可以了
 
可是参数不对呀。您能告诉我用SHELLEXEC应该怎么写?
 
把光标放到ShellExecute上,按F1
 
老大呀,我看了ShellExecute的说明,我也知道他怎么用,可是ShellExec的参数和ShellExecute的参数完全不一样呀。
 
同志们跑题啦,给分的是我,我想知道hha.dll,hhc.exe的<br>调用函数如编译、解译、以及捉标题等等!
 
接受答案了.
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
D
回复
0
查看
1K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
I
回复
0
查看
535
import
I
顶部