-
April 1st, 2010, 01:52 PM
#1
Connect new .chm files to old Programs?
I have a number of VC++ programs written when .hlp files were in use. I am rewriting my old .hlp files as the newer .chm files.
Can someone point me to a guide showing the changes I need to make to my old programs so that clicking "Help" will run a .chm file instead of a .hlp file?
Clay
-
April 2nd, 2010, 05:57 AM
#2
Re: Connect new .chm files to old Programs?
Victor Nijegorodov
-
April 2nd, 2010, 10:24 AM
#3
Re: Connect new .chm files to old Programs?
I have done that. I got a lot of articles about context help .html files which didn't seem applicable.
I may have missed something though.
I was hoping there are some simple changes I can make to the places where the old hlp files are called in my programs.
-
April 14th, 2010, 02:16 PM
#4
Re: Connect new .chm files to old Programs?
In case someone else is interested this is what I came up with.
I added the following to the OnHelp event handler.
void CDBcalcDlg::OnHelp()
{
char szAppPath[MAX_PATH] = "";
CString strAppDirectory;
CString strToOpen;
::GetModuleFileName(0, szAppPath, sizeof(szAppPath) - 1);
// Extract directory
strAppDirectory = szAppPath;
strAppDirectory = strAppDirectory.Left(strAppDirectory.ReverseFind('\\'));
strToOpen = strAppDirectory + _T("\\dBcalc.chm");
ShellExecute(hWnd, _T("open"), _T(strToOpen),NULL, NULL, SW_SHOWNORMAL);
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|