Why can't Visual Studio 2008 find afxcontrolbars.h?

I installed VS 2008. When I try to create a project, I get an error message:

Cannot open include file: 'afxcontrolbars.h': no ​​such file or directory

So, I think, for this I need to install tape controls. Could you tell me where the SDK is available for download? A link would be very helpful; I myself was looking for her, but I could not find her. :(

+7
source share
2 answers

This seems like a strange problem to me. afxcontrolbars.h is certainly included in the standard installation of VS 2008. The only way you might be missing MFC components is to install an Express version that does not support MFC.

The first thing I would like to do is check if I can create and compile a completely new, unfilled MFC application using one of the built-in templates. If this works, something is wrong with your project properties.

Also check manually in the \Microsoft Visual Studio 9.0\VC\atlmfc\include to see if you can find the header file before trying to manually reinstall the SDK platform. It can be as simple as Visual Studio is unable to find the file. To fix this, open the Options dialog box, expand the Projects and Solutions tree, select VC ++ Directories, select Win32 and Include Files from the list $(VCInstallDir)atlmfc\include at the top and make sure $(VCInstallDir)atlmfc\include included in the list:

Visual Studio Options - Projects and Solutions - VC ++ Directories - Win32 Include files

Of course, the ribbon control (and other ribbon-specific elements) were not added in VS 2008 until the MFC Feature Pack. You will need to download and install this in order to compile applications that take advantage of these features in VS 2008. You can download the Feature Pack here for free.

+7
source

I have VS2008 on a 64-bit Win7 machine. In my case, the include files installed in the c:\program(x86) folder, but VS were installed in c:\program .

By changing the path to the hard-coded path

 C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include 

now it works!

0
source

All Articles