Determine topic id to open it in CHM file

爷,独闯天下 提交于 2019-12-03 13:49:10

问题


I am trying to implemented F1 help for my WinForm application. I have read this thread:

How to create F1 help in windows forms using c#

My question is how do I find the topic id of my topic in the CHM file? I am using HTML Help Workshop, and I have looked over every HTML file and option and could not find it. Thanks.

Help.ShowHelp(this, "helpfile.chm", HelpNavigator.TopicId, "1234");

回答1:


You can define topic IDs for your help file as follows:

  1. Open your help project (.hhp) in a text editor.
  2. Add the [ALIAS] section and define IDs for the topics:

    [ALIAS]
    Foo=MyTopic.htm
    Bar=SomeFolder\AnotherTopic.htm
    
  3. Add the [MAP] section and specify the ID values:

    [MAP]
    #define Foo 7
    #define Bar 42
    
  4. Re-compile your help file.

More info here: HTML Help - Context Help Ids.



来源:https://stackoverflow.com/questions/3440868/determine-topic-id-to-open-it-in-chm-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!