Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Implementation of HTML Help in MFC - Help please!!

Implementation of HTML Help in MFC - Help please!!

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++htmltutorial
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lakshmi Priya Musuvathy
    wrote on last edited by
    #1

    Hello, I am new to this forum and new to HTML Help too. I have created a .chm file from the HTML Help Workshop. Now, i am trying to implement it in MFC program. I am stuck here with the context sensitive help where i have a "Help" button in a dialog box and should display the appropriate help provided for the dialog box. I can't understand how to create the context ids and how to pass between the HTML Help workshop file (.chm) and MFC. Any sample would be really helpful. Could anyone please help me to do this. Its quite urgent :( Thanks in advance, Regards Priya

    C 1 Reply Last reply
    0
    • L Lakshmi Priya Musuvathy

      Hello, I am new to this forum and new to HTML Help too. I have created a .chm file from the HTML Help Workshop. Now, i am trying to implement it in MFC program. I am stuck here with the context sensitive help where i have a "Help" button in a dialog box and should display the appropriate help provided for the dialog box. I can't understand how to create the context ids and how to pass between the HTML Help workshop file (.chm) and MFC. Any sample would be really helpful. Could anyone please help me to do this. Its quite urgent :( Thanks in advance, Regards Priya

      C Offline
      C Offline
      Cohen
      wrote on last edited by
      #2

      Hi, I don't know is it possible to fetch the context IDs programmatically from the CHM-file. I have always used hardcoded values (and the people who have made the help-files have ofcourse used those same values). So, make a header file. e.g. HelpIDs.h where you define the IDs: #define HID_MAINVIEW 100 #define HID_SOMEOTHERVIEW 101 #define HID_YETANOTHERVIEW 102 Then include this file and just invoke html help with the correct id HtmlHelp( GetDesktopWindow(), "helpfile.chm", HH_HELP_CONTEXT, HID_MAINVIEW) ; I have no experience from making the chm-files though..

      L 1 Reply Last reply
      0
      • C Cohen

        Hi, I don't know is it possible to fetch the context IDs programmatically from the CHM-file. I have always used hardcoded values (and the people who have made the help-files have ofcourse used those same values). So, make a header file. e.g. HelpIDs.h where you define the IDs: #define HID_MAINVIEW 100 #define HID_SOMEOTHERVIEW 101 #define HID_YETANOTHERVIEW 102 Then include this file and just invoke html help with the correct id HtmlHelp( GetDesktopWindow(), "helpfile.chm", HH_HELP_CONTEXT, HID_MAINVIEW) ; I have no experience from making the chm-files though..

        L Offline
        L Offline
        Lakshmi Priya Musuvathy
        wrote on last edited by
        #3

        Thanks for the reply. There is a .hm file created by the project which has the following IDH_* IDH_MAINFRAME 0x20080 IDH_HTML_HTYPE 0x20081 IDH_ABOUTBOX 0x20064 and as u told, i created the HelpID.h and defined the ids. While compiling it gives the following error. error C2065: 'HID_MAINFRAME' : undeclared identifier I looked into the article in http://www.codeguru.com/Cpp/W-P/help/html/print.php/c6513/ and he has done it without using OnHelp functions but could access any topics which i couldn't understand how. Can anyone done such help projects with HTML Help? Or can anyone explain how the context ids are working? Thanks Priya

        C 1 Reply Last reply
        0
        • L Lakshmi Priya Musuvathy

          Thanks for the reply. There is a .hm file created by the project which has the following IDH_* IDH_MAINFRAME 0x20080 IDH_HTML_HTYPE 0x20081 IDH_ABOUTBOX 0x20064 and as u told, i created the HelpID.h and defined the ids. While compiling it gives the following error. error C2065: 'HID_MAINFRAME' : undeclared identifier I looked into the article in http://www.codeguru.com/Cpp/W-P/help/html/print.php/c6513/ and he has done it without using OnHelp functions but could access any topics which i couldn't understand how. Can anyone done such help projects with HTML Help? Or can anyone explain how the context ids are working? Thanks Priya

          C Offline
          C Offline
          Cohen
          wrote on last edited by
          #4

          Lakshmi Priya Musuvathy wrote: error C2065: 'HID_MAINFRAME' : undeclared identifier I'd quess that you simply don't include the header file correctly or that you have a typo somewhere. Should it be IDH_MAINFRAME for example?

          L 1 Reply Last reply
          0
          • C Cohen

            Lakshmi Priya Musuvathy wrote: error C2065: 'HID_MAINFRAME' : undeclared identifier I'd quess that you simply don't include the header file correctly or that you have a typo somewhere. Should it be IDH_MAINFRAME for example?

            L Offline
            L Offline
            Lakshmi Priya Musuvathy
            wrote on last edited by
            #5

            Hi, Yes, it was IDH_MAINFRAME and i was not giving the correct header file. it worked now. :) many thanks, Regards Priya

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups