• Advertisement
Sign in to follow this  

DirectX and MFC

This topic is 4613 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to create an MFC application that uses DirectX. The problem is that when I add the line, #include <d3dx9.h>, the compiler throws an error telling me that an MFC application cannot include windows.h. I checked inside d3dx9.h and found out that it is including windows.h, which is a really problem, because I cannot go changing that obviously. So how am I supposed to include d3dx9.h in my MFC application, without it throwing this error about including windows.h?

Share this post


Link to post
Share on other sites
Advertisement
Hi Sandy,
I think that windows and mfc headers should be included before you include d3dx9.h, this is what the sdk utilites which use MFC and Direct3D do.

If you need an an example take a look at the StdAfx.h file for the EffectEdit utility. The folder containing this file on my system is:
C:\Program Files\Microsoft DirectX 9.0 SDK (April 2005)\Utilities\Source\EffectEdit.

HTH,
Cambo_frog

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement