Skip to main content
gamedev.net
🔒 Locked

Compiler Problem

Started by Hammonjj 3 replies 950+ views
Original Post
Hammonjj
Hammonjj
So I just downloaded Visual C++ 2005 Express Edition and I'm trying to learn MFC, but I seem to be having a problem with my compiler. I keep getting this error message: fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory Here is the code. What's wrong? // MFC Test3.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include //hello.cpp // Declare the application class class CHelloApp : public CWinApp { public: virtual BOOL InitInstance(); }; // Create an instance of the application class CHelloApp HelloApp; // Declare the main window class class CHelloWindow : public CFrameWnd { CStatic* cs; public: CHelloWindow(); }; // The InitInstance function is called each // time the application first executes. BOOL CHelloApp::InitInstance() { m_pMainWnd = new CHelloWindow(); m_pMainWnd->ShowWindow(m_nCmdShow); m_pMainWnd->UpdateWindow(); return TRUE; } // The constructor for the window class CHelloWindow::CHelloWindow() { // Create the window itself Create(NULL, "Hello World!", WS_OVERLAPPEDWINDOW, CRect(0,0,200,200)); // Create a static label cs = new CStatic(); cs->Create("hello world", WS_CHILD|WS_VISIBLE|SS_CENTER, CRect(50,80,150,150), this); }
James HammondUniversity of ColoradoDepartment of Computer Science
Dave Hunt
Dave Hunt
Visual C++ Express Edition doesn't include MFC, so you won't get very far with MFC programming. As an alternative, have a look at the .NET Framework, which is included.
gumpy
gumpy
the express version doesn't support atl or mfc.
This space for rent.
Hammonjj
Hammonjj
What is .NET Framework exactly?
James HammondUniversity of ColoradoDepartment of Computer Science

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.