C++ MFC 2008 ERROR: Description: "fatal error C1083: Cannot open include file: 'windows.h':

Description: "fatal error C1083: Cannot open include file: 'windows.h': No such file or directory"
File: "afxv.w32.h"
Line 169

This is the error I get when I try to compile an MFC application in Visual Studio 2008

I have already downloaded and installed the SDK for Microsoft Visual Studio 2008.

Any Ideas?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

is your SDK include directory in your include path?
you must add it to INCLUDE environment if you build from command shell, otherwise go to IDE options, locate visual C++ directories, include directories, and make sure %SDK%\include is present --
oh -
%SDK% means wherever you installed the SDK, obviously ;-)
New_AlexAuthor Commented:
Thanks lomo

in the List that can be found in:  
View Options / Projects and Solutiona / VC++ Directories / Show directories for: Include files

There is a line:

I don't know if it is this you mean, but even if I copy and paste your line "%SDK%\include" it doesn't seem to get it right ...

What do you think people?
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

your include paths should be


that was done by the vs installation. a separate sdk installation normally makes no sense cause it would install nearly the same files somewhere else and you would need to synchronize the environment.

you can find out what those environment variables mean by openning a cmd window and type for example

set WindowsSdkDir

Open in new window

New_AlexAuthor Commented:
Hi. I have contacted Microsoft and they asked me to upgrade to Microsoft Visual 2010 and then come back to them for support.

Studio 2010 works fine so I will stick with it.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
New_AlexAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.