1
A
回答
1
1
我假設你的意思的HTMLHelp,因爲WinHelp
已被棄用,5年前停止了與Windows出貨。
這是我添加到我的ApplicationEvents
對象的OnHelp
事件處理程序的代碼:
function TdmGlobal.ApplicationEvents1Help(Command: Word; Data: Integer;
var CallHelp: Boolean): Boolean;
var
HelpFile: string;
LocalFile: string;
HCommand : word;
begin
CallHelp := False;
Result := False;
//i've named the help file the same as the executable, but with CHM extension
HelpFile := ChangeFileExt(Application.ExeName, '.chm');
if not FileExists(HelpFile) then
Exit;
//Starting in 2003 HtmlHelp will no longer work from a network drive.
//Copy the file to the local machine's temp folder if it's sitting on a network share
if PathIsNetworkPath(HelpFile) then
begin
LocalFile := IncludeTrailingBackslash(GetTemporaryPath)+ExtractFilename(HelpFile);
if (not FileExists(LocalFile)) then
begin
try
CopyFile(PChar(HelpFile), PChar(LocalFile), False);
except
Exit;
end;
end
else
begin
if (GetUncompressedFileSize(HelpFile) <> GetUncompressedFileSize(LocalFile)) then
try
CopyFile(PChar(HelpFile), PChar(LocalFile), False);
except
//Exit; eat it
end;
end;
HelpFile := LocalFile;
end;
{translate WinHelp --> HTMLHelp}
case Command of
HELP_CONTENTS:
begin
HCommand := HH_DISPLAY_TOC;
Data := 0;
end; {HELP_CONTENTS..}
HELP_CONTEXT : HCommand := HH_HELP_CONTEXT;
HELP_CONTEXTPOPUP : HCommand := HH_HELP_CONTEXT;
HELP_FINDER : HCommand := HH_DISPLAY_TOPIC;
HELP_KEY : HCommand := HH_DISPLAY_INDEX;
HELP_QUIT :
begin
HCommand := HH_CLOSE_ALL;
Data := 0;
end; {HELP_QUIT..}
else
begin {default}
HCommand := HH_DISPLAY_TOPIC;
Data := 0;
end; {default..}
end; {case Command..}
hhCtrl.HtmlHelp(GetDesktopWindow(), HelpFile, HCommand, Data);
end;
包含了一些常量,以及功能hhCtrl.pas
:
function HtmlHelp(
hwndCaller: HWND;
szFile: AnsiString;
uCommand: UINT;
dwData: DWORD): HWND; stdcall; external 'hhctrl.ocx' name 'HtmlHelpA'; {external API call}
相關問題
- 1. 使用德爾福編輯CSS使用德爾福
- 2. 德爾福v.Word - 如何從德爾福
- 3. 德爾福HID Delphi7和德爾福XE2
- 4. 與德爾福
- 5. 德爾福:德爾福和Microsoft SQL Server 2005從功能不好的計算值
- 6. 德爾福使用HIDController 2010
- 7. 德爾福使用Indy 10
- 8. 從德爾福使用wordpress
- 9. 德爾福:使用參數
- 10. LIBRTMP德爾福:使用DLL
- 11. 德爾福
- 12. 德爾福
- 13. 德爾福:TRegExpr
- 14. 德爾福
- 15. 德爾福(dbExpress的)
- 16. 與德爾福
- 17. 類德爾福
- 18. 德爾福ftpgetfile
- 19. DES_KEY_SZ德爾福
- 20. 德爾福
- 21. 與德爾福
- 22. 德爾福Application.HintColor
- 23. 在德爾福7
- 24. 德爾福的QuickBooks
- 25. 德爾福的TQuery
- 26. 德爾福TObjectDictionary有
- 27. 德爾福 - 素數
- 28. 德爾福7繼承
- 29. 德爾福typinfo SetPropValue
- 30. 解決中的TDataSetProvider德爾福2010年或德爾福2009年
仍然使用創建的HTML幫助幫助和手冊與我的Delphi 2009應用程序。 :) – kludg 2010-09-08 16:03:31