Results 1 to 8 of 8

Thread: context based help using chm file

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2006
    Posts
    18

    context based help using chm file

    I need to implement help to my VB6 project using a chm file.

    have implemented the help and able to preview a content and index based help but don't know how to open the search page of the help file.

    Here is the code which i am using

    VB Code:
    1. Private Declare Function HtmlHelp Lib "HHCtrl.ocx" Alias "HtmlHelpA" _
    2.     (ByVal hWndCaller As Long, _
    3.      ByVal pszFile As String, _
    4.      ByVal uCommand As Long, _
    5.      dwData As Any) As Long
    6.  
    7. Private Sub Contents_Click()
    8. HtmlHelp hWnd, "help.chm", HH_HELP_CONTEXT, ByVal 100&
    9. End Sub
    10.  
    11. Private Sub Index_Click()
    12. HtmlHelp hWnd, "help.chm", HH_DISPLAY_TOPIC, ByVal "filesused.html"
    13. End Sub

    Can some one help me with the search option also.One more problem i am facing with my help page is that if i click on content it shows me the contents page in the help file but next time when i click index,it again shows me the contents page only.

    Thanks

  2. #2
    Addicted Member
    Join Date
    Aug 2002
    Location
    Michigan
    Posts
    181

    Re: context based help using chm file

    Code:
    Public Const HH_DISPLAY_TOC = &H1           ' Displays Table Of Contents
    Public Const HH_DISPLAY_INDEX = &H2         ' Displays Index
    Public Const HH_DISPLAY_SEARCH = &H3        ' not currently implemented
    
    HtmlHelp hwndo, App.Path & "\PopUP\New\PU.chm", HH_DISPLAY_TOC, 0   ' Display TOC.
    The TOC & Index commands work, the Search command bombs. Apparently the comment is true.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Apr 2006
    Posts
    18

    Re: context based help using chm file

    i am not facing any problem with the TOC and index as it is working fine with the code below which i am using.The problem is that search is not working.


    VB Code:
    1. Const HH_DISPLAY_TOPIC As Long = &H0
    2. Const HH_HELP_CONTEXT As Long = &HF
    3.  
    4. Private Sub Contents_Click()
    5. HtmlHelp hWnd, "help.chm", HH_HELP_CONTEXT, ByVal 100&
    6. End Sub
    7.  
    8. Private Sub Index_Click()
    9. HtmlHelp hWnd, "help.chm", HH_DISPLAY_TOPIC, ByVal "filesused.html"
    10. End Sub

    I tried the code given by you but my VB exits with error when i use the code.
    Can you help me with the search command

  4. #4
    Addicted Member
    Join Date
    Aug 2002
    Location
    Michigan
    Posts
    181

    Re: context based help using chm file

    I did a fairly thourough search of the forum and externally while seeking the dirty details of displaying text popup help. None of the sources I found exemplified the use of HH_DISPLAY_SEARCH. The comment attached to the constant declaration says that it is not implemented. It does not work for me, so I assume that you are out of luck. If there is a way to make it work, Opus should know about it.

    You can let your users select the search tab from the navigation pane after they open the TOC.

  5. #5
    Addicted Member
    Join Date
    Aug 2002
    Location
    Michigan
    Posts
    181

    Re: context based help using chm file

    I now detect an error on my part. The last parm. should be 0, not 100, but changing it won't make a difference.

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Apr 2006
    Posts
    18

    Re: context based help using chm file

    This is what i have implememted it for users. When they select search they are directed to the TOC but i don't feel this is the right way to approach a problem but anyways thanks for your feedback.

    Do you have idea about my second problem mentioned below as to how map the pages correctly. if i click on the content tab, contents page in the help file is displayed but next time when i click index tab,it again shows me the contents page only and viceversa.This is the same problem which you face in windows which displays the last accessible directory when you try to open a file.

    Thanks,
    Amit

  7. #7
    Addicted Member
    Join Date
    Aug 2002
    Location
    Michigan
    Posts
    181

    Re: context based help using chm file

    If the help file's tabs are misfiring, that is completely beyond my knowledge. I was assuming that you referred to clicking your program's help buttons. I put in a pm to the forum's html help expert. Perhaps he will jump in to save the day.

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Apr 2006
    Posts
    18

    Re: context based help using chm file

    Can someone help with the misfiring of help tabs and implementing search feature in help file

    Amit

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width