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. How to implement Help button in a property page?

How to implement Help button in a property page?

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
3 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.
  • B Offline
    B Offline
    bin8922
    wrote on last edited by
    #1

    Hello, everyone, I'd like to know how to handle the help button in property page. In my property page, there are OK, Cancel, Apply and Help button. For OK, Cancel and Apply button, it is easy to handle. I just go to ClassWizard->Message Maps to add function OnOK, OnCancel and OnApply, and then put code into the functions. But I don't know how to handle the help button. What I can only think of is to get the rect of IDHELP button and then handle the mouse left click message. But I think there should be more straightforward way to handle it. If you know how to handle it, please drop me a couple lines. Thanks a lot in advance. Bin

    D 1 Reply Last reply
    0
    • B bin8922

      Hello, everyone, I'd like to know how to handle the help button in property page. In my property page, there are OK, Cancel, Apply and Help button. For OK, Cancel and Apply button, it is easy to handle. I just go to ClassWizard->Message Maps to add function OnOK, OnCancel and OnApply, and then put code into the functions. But I don't know how to handle the help button. What I can only think of is to get the rect of IDHELP button and then handle the mouse left click message. But I think there should be more straightforward way to handle it. If you know how to handle it, please drop me a couple lines. Thanks a lot in advance. Bin

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Add the following statement to the sheet's message map:

      ON_COMMAND(ID_HELP, OnHelp) // the function called can differ depending on your needs

      In the function that creates the sheet object, add:

      sheet.m_psh.dwFlags |= PSH_HASHELP;

      page1.m_psp.dwFlags |= PSP_HASHELP;
      page2.m_psp.dwFlags |= PSP_HASHELP;
      ...


      "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

      B 1 Reply Last reply
      0
      • D David Crow

        Add the following statement to the sheet's message map:

        ON_COMMAND(ID_HELP, OnHelp) // the function called can differ depending on your needs

        In the function that creates the sheet object, add:

        sheet.m_psh.dwFlags |= PSH_HASHELP;

        page1.m_psp.dwFlags |= PSP_HASHELP;
        page2.m_psp.dwFlags |= PSP_HASHELP;
        ...


        "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

        B Offline
        B Offline
        bin8922
        wrote on last edited by
        #3

        Thanks a lot

        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