Results 1 to 2 of 2

Thread: VC++ 6.0 problem with Afxres.h

  1. #1

    Thread Starter
    Lively Member Steve Cain's Avatar
    Join Date
    Sep 2000
    Location
    Wiltshire, UK
    Posts
    105

    Exclamation VC++ 6.0 problem with Afxres.h

    Can anyone please help? I am new to VC++ and I have a problem when trying to create a new project. When I use the MFC AppWizard to create a dialogue based project I get an error message:

    "Fatal Error RC1015: Cannot open include file Afxres.h"

    Originally, I found that the Include directory was missing from the C:\Program files\Microsoft Visual Studio\VC98\MFC\ directory. A re-install fixed that but the problem still remains with the above error.

    The Afxres.h is not being created when the new project is created and I guess that this is an include library that cannot be found.

    If anyone can help, I would be grateful, the tech support guys here have not seen this before. I am running VC++ 6.0 Enterprise Edition under NT4.

    Thanks,

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    afxres.h declares all the constants MFC uses for the predefined menu etc. I have no idea why the compiler can't find it, but yoú can do the following: if your project is not MFC, you can open the .rc file in a text editor and manually replace every occurence of afxres.h with winresrc.h. The problem is that you need to do this every time you add or modify a resource, since dumb VC++ undoes your change.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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