The best way to learn to program is to look at source code and see how things are done. There is nothing like a good example in source code to show you how things should be done and to get you on the way. I myself have learned a great deal by looking at sample code and using the knowledge I gain from there to build my own applications. Websites like CodeProject and CodeGuru are a great resource to any programmer, especially if you are a beginner.
On this page I will share some of my own source code with you as I find the time to do so. You can download the sample code and use it for your own projects. I hope they will be helpful to you. You’ll also find demos of programs I’ve written in the past.
DirectX 9 Samples with Source Code