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. Change help file in my app

Change help file in my app

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
4 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.
  • M Offline
    M Offline
    misturas
    wrote on last edited by
    #1

    Hi to all, I made a Visual C++ MDI app with help support Project name is *****Manager,and I set the builder to build my app as *****Man.exe My help file is *****Manager.hlp,but if I click on the help button in my app It requested me for *****Man.hlp Who can I set my app to search for default for *****Manager.hlp? Thanks to all:):) Cristian

    R 1 Reply Last reply
    0
    • M misturas

      Hi to all, I made a Visual C++ MDI app with help support Project name is *****Manager,and I set the builder to build my app as *****Man.exe My help file is *****Manager.hlp,but if I click on the help button in my app It requested me for *****Man.hlp Who can I set my app to search for default for *****Manager.hlp? Thanks to all:):) Cristian

      R Offline
      R Offline
      Roger Allen
      wrote on last edited by
      #2

      From the MSDN: CWinApp::m_pszHelpFilePath Remarks Contains the path to the application’s Help file. By default, the framework initializes m_pszHelpFilePath to the name of the application with ".HLP" appended. To change the name of the help file, set m_pszHelpFilePath to point to a string that contains the complete name of the desired help file. A convenient place to do this is in the application's InitInstance function. m_pszHelpFilePath is a public variable of type const char*. Note If you assign a value to m_pszHelpFilePath, it must be dynamically allocated on the heap. The CWinApp destructor calls free( ) with this pointer. You many want to use the _tcsdup( ) run-time library function to do the allocating. Also, free the memory associated with the current pointer before assigning a new value. For example: //First free the string allocated by MFC at CWinApp startup. //The string is allocated before InitInstance is called. free((void*)m_pszHelpFilePath); //Change the name of the .HLP file. //The CWinApp destructor will free the memory. m_pszHelpFilePath=_tcsdup(_T(“d:\\somedir\\myhelp.hlp”)); CWinApp Overview | Class Members | Hierarchy Chart Roger Allen - Sonork 100.10016 Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...

      M 1 Reply Last reply
      0
      • R Roger Allen

        From the MSDN: CWinApp::m_pszHelpFilePath Remarks Contains the path to the application’s Help file. By default, the framework initializes m_pszHelpFilePath to the name of the application with ".HLP" appended. To change the name of the help file, set m_pszHelpFilePath to point to a string that contains the complete name of the desired help file. A convenient place to do this is in the application's InitInstance function. m_pszHelpFilePath is a public variable of type const char*. Note If you assign a value to m_pszHelpFilePath, it must be dynamically allocated on the heap. The CWinApp destructor calls free( ) with this pointer. You many want to use the _tcsdup( ) run-time library function to do the allocating. Also, free the memory associated with the current pointer before assigning a new value. For example: //First free the string allocated by MFC at CWinApp startup. //The string is allocated before InitInstance is called. free((void*)m_pszHelpFilePath); //Change the name of the .HLP file. //The CWinApp destructor will free the memory. m_pszHelpFilePath=_tcsdup(_T(“d:\\somedir\\myhelp.hlp”)); CWinApp Overview | Class Members | Hierarchy Chart Roger Allen - Sonork 100.10016 Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...

        M Offline
        M Offline
        misturas
        wrote on last edited by
        #3

        Thanks very much I first tried to search the solution in MSDN library but I didn't found anything,probably I was searching in the wrong direction:doh::doh: And like we say in Italy... CIAO CIAO :cool::cool:

        R 1 Reply Last reply
        0
        • M misturas

          Thanks very much I first tried to search the solution in MSDN library but I didn't found anything,probably I was searching in the wrong direction:doh::doh: And like we say in Italy... CIAO CIAO :cool::cool:

          R Offline
          R Offline
          Roger Allen
          wrote on last edited by
          #4

          Thats OK. Half the problem with the MSDN is you need to know half the key words just to get near the right topic. In this partivular case after reading your question, I knew exactly what to look for. :smug: :-D Roger Allen - Sonork 100.10016 Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...

          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