   DirectX Initialization
  Hi guys,in lot of forums I've red, that lot of peaple who start programming with DirectXhave problems with the initialization.Well i wrote some simple code that creates a simple window and initilizes DiectX.It contains the WinMain(...) function.The rendertarget is set to the created window.I used #region flags so using Visual Studio you can collapse some things for better reading.NOTE: you must set the characteerset in your IDE to multibyte otherwise you will get compilererrors.(I commented the lines where you could get the errors)in Visual Studio Project->Properties->Configurationproperties->(now the first one, my IDE is in German there it's called "Allgemein")Don't forget include the DirectX SDK "Include" folder and the "Lib/x86" for32 bit systems or "Lib/x64" for 64 bit systems.http://rapidshare.com/files/384521049/main.cppPerhaps it could help somebody.   
  Looks reasonable to me, although for maximum compatibility, you should check for support of everything you use, including:1. Is that backbuffer format compatible with the desktop (If you use 16-bit or 24-bit colour for your desktop format, this may well be a problem)2. Is that depth-buffer format compatible with the backbuffer format?3. Is hardware vertex processing available (If so, it's more performant than software VP).Also:1. You should pass NULL as the HWND to GetMessage(), or else you'll never receive WM_QUIT2. You probably want to clear the depth buffer as well as the colour target3. It's common to use PeekMessage() and render as fast as you can unless you're writing an app that's designed to "play nice" with other applications (E.g. modelling software or something else that's not always got the full attention of the user when it's running).4. Your window is smaller than you think it is, which means D3D will be doing filtering to shrink the backbuffer onto the window, which is slightly slower and can cause artefacts. You should be using AdjustWindowRectEx() to compensate.   ;  Well actually it's the first version of the file.I will update it(had not enough time at school today)I think for beginners it should be enough at first though the most important things are included.Thanks for your post   ;  Moving to Your Announcements.   