1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Mfc Class Error

Discussion in 'MFC' started by codeguardian, Oct 26, 2007.

  1. codeguardian

    codeguardian New Member

    Joined:
    Oct 26, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    I am trying to use MFC classes to build a program. This is my fist time using the MFC classes and they dont seem to be working. I try to add CBitmap and get errors.

    CBitmap bm;

    and get errors:
    error C2065: 'CBitmap' : undeclared identifier
    error C2065: 'bm' : undeclared identifier

    I am including "afxwin.h", but this dose not seem to help. What am i doing wrong? :confused:
    I have tried on .NET and Visual C++ Express Edition.
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,293
    Likes Received:
    365
    Trophy Points:
    83
    Are all the path to the include path correct in the project.
     
  3. codeguardian

    codeguardian New Member

    Joined:
    Oct 26, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    It seems that you can not use MFC in Generic C++ Classes. You must choose MFC project from the start, at least on Visual Studio .NET.
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,293
    Likes Received:
    365
    Trophy Points:
    83
    That way its easier or else you need to be providing all the path related information.
     

Share This Page