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