具体项目要求是:把已有的网页显示的帮助文档用html help workshop生成一个.chm文档,并且能够在用c#编写的程序中感觉程序当前运行的情况,用户单击帮助按钮或者按F1后能够打开这个.chm文档,并自动定位到特定的位置。比如说:当前用户在输入一些产品信息,此时单击帮助按钮,打开.chm文档,chm文档自动定位到“输入产品信息”的帮助页面。
请问这个功能该如何实现?各位高手不妨给出详细步骤和程序。兄弟谢谢了!!!
请问这个功能该如何实现?各位高手不妨给出详细步骤和程序。兄弟谢谢了!!!
解决方案 »
- C#中,如果一个派生类同时拥有几个类的特性,如何建立继承关系?
- 在winform编程中哪个数据库控件带有分页功能啊
- 大家有什么好的文档管理工具?比如变来变去的需求文档?
- 调查:大家vs2005装是不是都装在默认目录?C:\Program Files\Microsoft Visual Studio 8
- 如何利用AJAX.NET把一个数组赋值给JS啊
- web应用程序与sql server数据库一起打包的完美解决方案,打包必读!
- 如何让一个TextBox只接受特定的字符集合?
- Exchange高手能否帮帮我?
- C#种调用事务
- 求一个C#动态编译的代码
- sql server 服務器名稱的問題
- 关于DateTimePicker控件ValueChanged事件的问题,在线等!!!!
LPCSTR pszFile,
UINT uCommand,
DWORD dwData) ;Parameter DescriptionhwndCaller----Specifies the handle (hwnd) of the window calling HtmlHelp(). The help window is owned by this window.
When the help window is closed, HtmlHelp() will return focus to the owner unless the owner is the desktop. If hwndCaller is the desktop, then the operating system determines where focus is returned.In addition, if HtmlHelp() sends any notification messages from the help window, they are sent to hwndCaller as long as you have enabled notification message tracking in the help window definition.pszFile----Depending on the uCommand value, specifies the file path to either a compiled help (.chm) file, or a topic file within a specified help file.
A window type name can also be specified, preceded with a greater-than (>) character.If the specified command does not require a file, this value may be NULL.uCommand----Specifies the command to complete.
dwData----Specifies any data that may be required, based on the value of the uCommand parameter. Return valueDepending on the specified uCommand and the result, HtmlHelp() returns one or both of the following:
The handle (hwnd) of the help window.
NULL. In some cases, NULL indicates failure; in other cases, NULL indicates that the help window has not yet been created. ExampleThe following example calls the HH_DISPLAY_TOPIC command to open the help file named Help.chm and display its default topic in the help window named Mainwin. Generally, the help window specified in this command is a standard HTML Help Viewer. HWND hwnd = HtmlHelp(GetDesktopWindow(),
"C:\\Help.chm::/Intro.htm>Mainwin",
HH_DISPLAY_TOPIC,
NULL) ;
总之,通过对API: HtmlHelp的调用,可以实现你要的效果。至于使用的详细方法,你得自己好好研究研究。
网上也有很多这方面的例子,关键词是:HtmlHelp API《HTML Help API Reference》可以从微软的网站上下载。
http://www.microsoft.com/downloads/details.aspx?FamilyID=00535334-c8a6-452f-9aa0-d597d16580cc&DisplayLang=en