After opening a project in Visual C++ 2008 Express Edition that I had built on a different machine running Visual Studio 6, I ran into the following error:
fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory
I discovered that it could easily be fixed by editing the RC resource script of the project: - Right-click on the RC file and select "View code"
- Replace the include statement containing afxwin.h to windows.h.
- Save the document and recompile.
Be wary that there are some differences between the two files, and are not entirely interchangeable. I'm not sure exactly what these differences are as I haven't run into any problems so far. Feel free to drop a comment if you have a more robust solution. |