CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    May 2003
    Location
    Jodhpur -> Rajasthan -> INDIA
    Posts
    453

    Help error in MFC

    I am getting following error while compiling the project. Still programm is executing fine No problem.(Why) and how to remove this error



    --------------------Configuration: Project - Win32 Debug---------------
    Making help file...
    hlp\Project.hpj(1) : error:
    Microsoft (R) Help Compiler
    HCRTF 4.03.0002
    Copyright (c) Microsoft Corp 1990 - 1995. All rights reserved.
    project.hpj
    HC5011: Error: Project.hpj :
    Cannot open the file "afxhelp.hm."

    Project.exe - 2 error(s), 0 warning(s)
    Leave Your Mark Wherever You Go
    http://www.danasoft.com/sig/d0153030Sig.jpg

  2. #2
    Join Date
    May 1999
    Location
    ALABAMA, USA
    Posts
    9,917
    You are compiling project with context-sensitive help.

    That requires afxhelp.hm file to be included. Generated by app wizard hpj (help project file) contains include statement that should be fully qualified path not just a filename.
    If this is generated without full path you probably have a problem with registry entry.

    You have two choices. One to correct problem manually by editing #include line.
    Help Workshop does not use the INCLUDE environment variable to search for files. You have to specify full path.
    It should look like this:

    #include <C:\Microsoft Visual Studio\VC98\MFC\include\afxhelp.hm>
    unless you have changed install defaults.

    Second choice would be checking registry:
    HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\General
    This contains a MFCPath32Bit key with value set to a MFC folder path, something like this:

    C:\Program Files\Microsoft Visual Studio\VC98\MFC

    Again if you have changed install defaults you would have to adjust path appropriately.
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

  3. #3
    Join Date
    Jan 2004
    Location
    Earth
    Posts
    567
    If you are building an app with help, the .hm file is usually generated using a custom build step on resource.h.

    For example

    Code:
    echo // Generated Help Map file.  Used by $(ProjectName).hpj. > ".\..\hlp\$(ProjectName).hm"
    echo. > ".\..\hlp\$(ProjectName).hm"
    .\..\hlp\makehm ID_,HID_,0x10000 IDM_,HIDM_,0x10000 "$(InputFileName)" >> ".\..\hlp\$(ProjectName).hm"
    
    echo. >> ".\..\hlp\$(ProjectName).hm"
    .\..\hlp\makehm CMB_,HCMB_,0x20000 "$(InputFileName)" >> ".\..\hlp\$(ProjectName).hm"
    
    echo. >> ".\..\hlp\$(ProjectName).hm"
    .\..\hlp\makehm RAD_,HRAD_,0x20000 "$(InputFileName)" >> ".\..\hlp\$(ProjectName).hm"
    The files associated with help are usually located in the hlp directory in your project directory.

  4. #4
    Join Date
    May 1999
    Location
    ALABAMA, USA
    Posts
    9,917
    Originally posted by TDM
    If you are building an app with help, the .hm file is usually generated using a custom build step on resource.h.
    That was already addressed:
    Originally posted by me
    Generated by app wizard hpj (help project file). . .
    Originally posted by TDM
    The files associated with help are usually located in the hlp directory in your project directory.
    Not all of them. Part of include calls for files that are in VS include directory.
    That was already addressed:
    Originally posted by me
    #include <C:\Microsoft Visual Studio\VC98\MFC\include\afxhelp.hm>
    Besides, what part of the above post shows how to resolve problem posted by d0153030?
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

  5. #5
    Join Date
    Jan 2004
    Location
    Earth
    Posts
    567
    OOPs you're right I misread it. He is having a problem with the standard MFC help IDs file, not the project generated help IDs file. The problem can be rectified by opening the Project.hpj file in hwc and then clicking on the "Map" button and then specifying the path to afxhelp.hm as John suggested.

    TDM
    Last edited by TDM; March 6th, 2004 at 05:20 PM.

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