帮助文件格式 *.chm能否指定打开某页?(100分)

  • 主题发起人 主题发起人 yjbin
  • 开始时间 开始时间
Y

yjbin

Unregistered / Unconfirmed
GUEST, unregistred user!
chm是比较先进的帮助文件格式,象Acdsee,东方影都等都用这种格式。
它能否象*.hlp老格式那样指定显示某页?调用的参数如何写?
ShellExecute(Handle,NULL,"acdsee.chm",?,?,SW_SHOWNORMAL);
我在命令行下打入 acdsee.chm keyword=welcom等尝试都无用。
另外:
我知道hlp格式有函数:Application->HelpFile();HelpJump();HelpCommand();等支持,
Hlp是否也可以插入多种图片格式?它相对chm的缺点是什么?现在是否应当使用chm格式?
 
chm文件可以直接打开某一页的,发个email到delphi6@163.com,我mail个例子给你
 
chm实际上是一堆html文件,你用M$的htmlhelpshop (visaul studio 6里面有)就知道了。
 
哎,本来是懒得查msdn的,
函数声明
Function HtmlHelpA (hwnd:integer;lpHelpFile:string;
wCommand:integer;
dwData:string) external 'hhctrl.ocx';
函数调用
htmlhelpA(form1.handle,你的帮助文件, HH_DISPLAY_TOPIC, "登录日记.htm")
下面是vb的例子,你自己看着定义hh_display_topic和其它的常量吧
Declare Function HtmlHelp Lib "hhctrl.ocx" Alias "HtmlHelpA" (ByVal hwndCaller As Long, ByVal pszFile As String, ByVal uCommand As Long, ByVal dwData As Long) As Long
使用
Const HH_DISPLAY_TOPIC = &H0
Const HH_SET_WIN_TYPE = &H4
Const HH_GET_WIN_TYPE = &H5
Const HH_GET_WIN_HANDLE = &H6
Const HH_DISPLAY_TEXT_POPUP = &HE ' Display string resource ID or text in a pop-up window.
Const HH_HELP_CONTEXT = &HF ' Display mapped numeric value in dwData.
Const HH_TP_HELP_CONTEXTMENU = &H10 ' Text pop-up help, similar to WinHelp's HELP_CONTEXTMENU.
Const HH_TP_HELP_WM_HELP = &H11 ' text pop-up help, similar to WinHelp's HELP_WM_HELP.
Const HH_CLOSE_ALL = &H12
Private Declare Function HtmlHelp Lib "hhctrl.ocx" Alias "HtmlHelpA" (ByVal hwndCaller As Long, ByVal pszFile As String, ByVal uCommand As Long, ByVal dwData As Long) As Long
Private Sub Form_Load()
'KPD-Team 2000
'URL: http://www.allapi.net/
'E-Mail: KPDTeam@Allapi.net
Dim hwndHelp As Long
'The return value is the window handle of the created help window.
hwndHelp = HtmlHelp(hWnd, "myfile.chm", HH_DISPLAY_TOPIC, 0)
End Sub
Private Sub Form_Unload(Cancel As Integer)
HtmlHelp Me.hWnd, "", HH_CLOSE_ALL, 0
End Sub
 
请问:在程序中使用hhctrl.ocx在2000/xp/98里是否有不兼容情况?
 

Similar threads

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