See the question and my original answer on StackOverflow

If you're new to C++ and Visual Studio, it may be a difficult start. Anyway, here are the steps to use the 2dboy framework with Visual Studio 2010:

1) install the DirectX SDK. You can find some information here Where is the DirectX SDK?. If you choose the June 2010 SDK and face the "S 1023" error, you might want to have a look at this Known Issue: DirectX SDK (June 2010) Setup and the S1023 error

2) download a new VS 2010 solution I have built from here: 2dboyframeworkvs2010 and unzip here somewhere on your disk. There were a lot of small problems I fixed because the original version was built using VS 2008 and an old version of the DirectX SDK.

3) follow the readme.html found in the solution root (I have modified the original with some extra information). You will need to download a library called irrKLang. and place it in the libs directory in the unzip folder.

4) compile the solution. You should now have a demo1.exe and demo2.exe in their respective directory. Copy irrKLang.dll and SDL.dll aside these and run them. The demo2.exe is an asteroid demo with sounds.