How to change F1's default help file's name?
-
I have a mfc application,based on CDialog,developed with vc6.0. Now I have make its *.chm help file. But when I press F1, it will always shows "Cannot find the ... *.HLP file". How can I change F1's default help file's name? Thanks in advance! Peter
-
I have a mfc application,based on CDialog,developed with vc6.0. Now I have make its *.chm help file. But when I press F1, it will always shows "Cannot find the ... *.HLP file". How can I change F1's default help file's name? Thanks in advance! Peter
-
I have a mfc application,based on CDialog,developed with vc6.0. Now I have make its *.chm help file. But when I press F1, it will always shows "Cannot find the ... *.HLP file". How can I change F1's default help file's name? Thanks in advance! Peter
CWinApp has a member LPCTSTR m_pszHelpFilePath that is initialized before InitInstance() is called using a _tcsdup(), so you could free() the current m_pszHelpFilePath and _tcsdup() your own path in your InitInstance(). NOTE: during termination MFC will call free() on m_pszHelpFilePath assuming that it has been allocated using _tcsdup() so DO NOT set it to a static string. -- modified at 3:30 Monday 17th September, 2007 If you are using VC6 then you will also need to override WinHelp either in theApp or in the mainFrame. If you are using VC7 and above then forget the suggestion above and just call EnableHtmlHelp() in your WinApp constructor.