Click to See Complete Forum and Search --> : DirectX 3D
Simon Pettman
April 14th, 1999, 03:18 AM
When I use MFC appwizard to generate boiler plate app and then #include "d3drmwin.h" I get an error suggesting that I have tried to include windows.h twice.
Anybody got any clues?
Research Engineer
Goodmans Loudspeaker Ltd
Havant, UK.
pettman.s@gll.co.uk
Gomez Addams
April 14th, 1999, 12:03 PM
This shouldn't be a problem since windows.h has this at the top of it :
#ifndef _WINDOWS_
#define _WINDOWS_
I went through those headers and it's really a mess.
Lot's of nested includes but I guess that can be difficult to avoid.
Personally, I try to do the protection outside the header, not in it.
Anyway, could you be more specific about the error condition you are getting ?
Simon Pettman
April 15th, 1999, 03:01 AM
I have added two lines of code in the StdAfx.h file.
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#define INITGUID // these lines added
#include "d3drmwin.h" // these lines added.
#include <afxwin.h> // MFC core and standard components
And got the error.
c:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) :
fatal error C1189: #error :
WINDOWS.H already included.
MFC apps must not #include <windows.h>
I hope this helps clear up the problem.
Thanks
Simon Pettman
Research Engineer
Goodmans Loudspeaker Ltd
Havant, UK.
pettman.s@gll.co.uk
Gomez Addams
April 16th, 1999, 12:13 PM
Try placing the d3drmwin.h include after afxwin.h
Also, the is a Direct-X library for use with MFC at
http://www.dxfc.com that might be helpful.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.