I am new to DirectX and have been trying to get the SDK tutorials to run for me. I have a different problem to those recently posted. My code for Tutorial1 (Creating a device) compiles but fails when the call to create a new device is made. I get the message box with "Could not initialize Direct3D. This tutorial will exit.". Some of the samples compile and run ok, some compile but show an empty (grey) window when run.
I have some idea: leave the tutorials, get a book and start doing stuff correctly. Normally tutorials are suitable for small stuff but not for something as huge as Direct3D.
It's probably because the D3DPRSENT_PARAMETERS you supplied were not supported by the graphics card you have. You need to give the structure parameters that the graphics card can handle. For example if your graphics card dosnt support 32 bits color, you cant give a desktop format such as X8R8G8B8, because then CreateDevice will fail.
Check the site in my sig for some very basic direct3d tutorials.