CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2008
    Posts
    15

    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

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Connect new .chm files to old Programs?

    Search MSDN for HtmlHelp
    Victor Nijegorodov

  3. #3
    Join Date
    Jun 2008
    Posts
    15

    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.

  4. #4
    Join Date
    Jun 2008
    Posts
    15

    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
  •  





Click Here to Expand Forum to Full Width

Featured