是否有用于读取 .hlp 帮助文件内容的库/API?
我的程序有一个帮助文件,并被要求在用户浏览菜单时在工具栏中添加菜单的描述。 所以我想我可以只使用菜单的帮助描述的开头,但只是找不到如何访问它的内容。
我看到 WinHelp 有一种宏语言,所以我想也许可以通过这个,但我找不到任何关于这方面的参考资料。
现在有人可以提供一些指示或示例来执行此操作吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
winhelpcgi 实用程序包含可以读取 .hlp 文件的库代码。 来源在这里: 链接
我没有使用过它,所以我可以'不保证其使用。
the winhelpcgi utility contains library code that can read .hlp files. The source is here: link
I haven't used it so I can't vouch for its usage.
首先,您的帮助系统应该在每个主题上有一个索引,允许您打开帮助并显示该主题(如果没有,请查看 帮助和手册 - 它将帮助您构建更完整的帮助文件)。 但是,这并不能直接解决您的问题,因为据我了解,您希望它在工具帮助窗口中弹出。
因此,您需要深入了解帮助系统如何使用密钥来提取适当的信息。 然而,(据我所知)直接访问 WinHelp 文件中特定的索引文本块并不是一件简单的事情。 您可能会在此处找到一些有用的信息。 您可能还想浏览帮助和手册网站上的论坛。
不过,这里有一个更大的问题:当用户将鼠标悬停在菜单项或按钮上时,弹出整个帮助主题(即使很短)真的有意义吗? 但对我来说却不是这样,我在贝尔实验室的 UI 设计小组工作了多年。 它是 A) 信息太多,B) 会在视觉上分散经验丰富的用户的注意力(因此令人难以置信的恼怒)。 这里接受的做法是弹出一个工具帮助窗口,其中包含一个非常短(1-4 个字)的按钮描述符(“打开”或“打开文件”)。
如果您希望每个菜单项或按钮都有帮助,我建议您选择两种选择之一。
首先,考虑使用“帮助光标模式”,其中光标使用帮助图标(带问号的箭头)。 用户通过按钮栏上的“帮助”按钮访问它。 在帮助光标模式下,用户单击任何项目都会将他们带到该项目的帮助主题。 我对这种方法有点冷淡,因为它是模态的,但我确实看到过它的完成。
其次,您可以简单地增强一下您的帮助系统。 也就是说,在帮助系统中创建一个主题,其中包含应用程序的屏幕截图。 在此屏幕截图中,为每个菜单项和/或按钮创建热点,并允许用户通过单击转到适当的主题。 如果做得好,这可以为用户提供他们想要了解的主题的视觉关键,而不会干扰程序的正常运行。
最重要的是:在执行实施当前计划所需的所有工作之前,请确保这是正确的计划!
First, your help system should have an Index on each topic that permits you to open help and have that topic appear (if not, then check out Help & Manual - it'll help you build more complete help files). However, this doesn't directly solve your problem since, as I understand it, you want this to pop up in a toolhelp Window.
Thus, you'll need to go under the surface and figure out how the Help system uses the key to pull the appropriate information. However, it is not a trivial undertaking (as far as I can tell) to directly access a specific, indexed chunk of text in a WinHelp file. You may find some information here that is of use. You might also want to browse the forums on the Help and Manual web site.
Here's a bigger question though: does it really make sense to pop up an entire help topic (even if short) when a user just hovers over a menu item or button? It doesn't to me and I spent years in a UI design group at Bell Labs. It is A) simply too much information and B) going to be visually distracting (and thus incredibly irritating) to experienced users. The accepted practice here is to pop up a toolhelp window with a very short (1-4 words) descriptor of the button ("Open" or "Open File").
If you want the help to be available for each menu item or button, I would suggest one of two alternatives.
First, consider having a "Help Cursor mode" where the cursor uses the help icon (an arrow with a question mark). The user accesses it via a Help button on the button bar. When in Help Cursor mode, a user click on any item will take them to the help topic for that item. I'm kind of lukewarm to this approach since it is modal but I've certainly seen it done.
Second, you might simply beef up your help system a bit. That is, create a topic in your Help system that features a screen shot of your application. On this screenshot, create hot spots for each menu item and/or button and permit the user to go to the appropriate topic by clicking on it. Done right, this gives the user a visual key to the topics they wish to learn about without interfering with the normal operation of your program.
Most importantly: before doing all of the work necessary to implement your current plan, be sure it is the right plan!