Tech Support > Microsoft Windows > Development Resources > PLEASE HELP!!!!!!! PLEASE HELP!!!!!
PLEASE HELP!!!!!!! PLEASE HELP!!!!!
Posted by BigMomma on April 16th, 2004


I'm having trouble implementing DirectInput into a MFC project.
I coded a simple app without MFC, only using the Win API and it worked fine.
The app only registers a DirectInput mouse device and retrieves some
information from it.
Now I'm trying to implement the code into a mfc project. I included
"dinput.h" and all necessary libraries (dxguid.lib, dinput8.lib).
But the compiler does not recognize any DirectInput struct or constant.

Can anyone help?

THX,

BigMomma


Posted by Scott McPhillips [MVP] on April 16th, 2004


BigMomma wrote:

It seems you included "dinput.h" incorrectly somehow. Try doing it in
the stdafx.h file.

--
Scott McPhillips [VC++ MVP]


Posted by BigMomma on April 16th, 2004


DAMN! I would have never found that out myself.
Thank you VEEERY MUCH!


Posted by Severian on April 17th, 2004


On Fri, 16 Apr 2004 19:11:04 -0500, "Scott McPhillips [MVP]"
<scottmcp@mvps.org.nothere> wrote:

No, it's a fucked up, retarded thing because it was designed for
people who only program on a single platform. It'snot worth a shit.

Trainable retards could have done better. <g>

(& It'snot really looks cool. I think I'll start using it a lot.)

--
Sev

Posted by Scott McPhillips [MVP] on April 17th, 2004


BigMomma wrote:

Hey, you're welcome! I see that my answer didn't explain anything. Did
you by any chance put your #include before the #include "stdafx.h"??

If so, the lesson to learn is that everything before #include "stdafx.h"
is ignored by the compiler. The precompiled header feature is a
wonderful thing, but you have to know about this trap when you use it.

--
Scott McPhillips [VC++ MVP]