type
THtmlHelp = procedure(hwndCaller: Thandle; pszFile: string; uCommand: integer; dwData: Dword); stdcall;
var
htmlhelp: Thtmlhelp;
procedure TForm1.Button1Click(Sender: TObject);
const
HH_DISPLAY_TOPIC = 0;
begin
hhctrl := LoadLibrary('hhctrl.ocx');
if (hhctrl <> 0) then
begin
@htmlhelp := GetProcAddress(hhctrl, 'HtmlHelpA');
//如果是unicode版本得话,你要调用'HtmlHelpW'
end;
if @htmlhelp <> nil then
HtmlHelp(getdesktopwindow(), 'c:/test/proj/myproj.chm', HH_DISPLAY_TOPIC, 0 {dword(pchar('gsjj.htm'))});
// FreeLibrary(hhctrl); 这一行不能要,呵呵,暂时我讲不出原因
end;
关于函数HtmlHelp的用法,你得参考MSDN了。呵呵