I've noticed the in the August SDK (and previous ones) that all of the samples use a WndProc function to handle keyboard and mouse input. I assume there is a good reason that DirectInput is not being used.
Could someone please enlighten me as to what it is....
Does using WndProc give better performance than DirectInput

DirectInput or WndProc?
Sarmad
My understanding is that it maintains the clarity/simplicity of the sample code by not introducing another DX component.
The vast majority of the D3D samples tend to use quite trivial keyboard/mouse input that, as you've probably seen, can be handled by a few lines in the appropriate WndProc callback.
DInput, as far back as I can remember, has always had the advantage of being much lower-level than the standard Win32/WinProc stuff, so it should still be more efficient/faster.
For anything more advanced than a sample (e.g. a game/application) I would use DInput - it's not necessarily the performance that is the bonus, but also the features that DInput offers that I find useful.
hth
Jack
Grismath
Yes, that is without a doubt one of the cool things you get in DInput that (to my knowledge) you don't get elsewhere
I always use buffered input - as it delivers me a list of events that have occured in a similar(ish) way to WndProc's message pump...
Although, I'm not sure if there's any reason to pick between them for anything other than your own personal coding style and/or software's architecture.
Action mapping is probably your best bet if you want to have a set of controls for a player(s) and so on... Our game is a management one where it's heavily GUI based so I don't use action mapping for it - so it's not necessarily going to be the best solution!
hth
Jack
Mehdi311ggg
Especially if you're creating something like a flight simulator or driving game that uses input other than a mouse and keyboard.
Christian Liensberger
Shrad
I've gone with DirectInput and now have a working 'simple' input manager class.
When you say 'features' do you mean Action Mapping
At the moment getting immediate mouse/keyboard data by calling 'GetDeviceState' but I'm now thinking that getting buffered data would be more reliable. After reading the docs it looks like action mapping is better than both, any opinion