I am running trough the www.winprog.org tutorial, I have run into yet another error.

``````#ifndef __BORLANDC__
#include "winres.h"
#endif``````

it says it cannot open "winres.h", which I would agree with because it is not located on my computer at all!
Is this file part of some other program, I thought it was an included file with windows, but apparently not.
Can anyone just fill me in on the who/what/where/etc of winres.h?

It's an mfc file (ms compilers standard edition or better are required).

The simplest workaround is to just replace it with #include <windows.h>.

Alternatively, if you're using mingw then you can #include <afxres.h> (which just #includes windows.h and defines IDC_STATIC).

If you're using msvc-express with the platform/windows …

## All 3 Replies

It's an mfc file (ms compilers standard edition or better are required).

The simplest workaround is to just replace it with #include <windows.h>.

Alternatively, if you're using mingw then you can #include <afxres.h> (which just #includes windows.h and defines IDC_STATIC).

If you're using msvc-express with the platform/windows sdk then you'll have a copy of it (both afxres.h and winres.h) in your-win-psdk-directory\Include\mfc; you can add this directory to the include paths of your compiler.

Bingo, thanks dude.

Confirmed! 10.01.2011! VS-2008 Express with SP-1, on Windows XP. Thanks a lot! Regards!

commented: Gee, thanks for resurrecting a 4 year old thread for this worthless comment! -4
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.