chm格式的文件如何修改内容?
发布网友
发布时间:2022-04-25 16:58
我来回答
共2个回答
热心网友
时间:2023-10-20 21:27
这是压缩存储的HTML格式的帮助文件,微软计划使用这种格式替代.hlp格式。如果想制作这种文件可以访问 http://msdn.microsoft.com/workshop/author/Htmlhelp/下载HTML Help Work Shop,编辑方法参考QA003204 "用Htmlhelp Workshop制作符合Windows 98规范的帮助文件"。下面以VB为例说明如何在程序中打开这种文件。
首先建立一个模块,输入以下内容:
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.
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
然后使用下面的代码调用帮助:
' HTML Help file launched in response to a button click:
Private Sub HH_DISPLAY_Click()
'hWnd is a Long defined elsewhere to be the window handle
'that will be the parent to the help window.
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
' A specific topic identified by the variable ContextID is launched
' in response to this button click:
Private Sub HH_HELP_Click()
Dim hwndHelp As Long
'The return value is the window handle of the created help window.
hwndHelp = HtmlHelp(hWnd, "myfile.chm", HH_HELP_CONTEXT, ContextID)
End Sub
热心网友
时间:2023-10-20 21:27
使用反编译软件,ABC Amber CHM Converter 下载:http://jsmcc.onlinedown.net/soft/15973.htm