Try the Allegro Library:
http://www.talula.demon.co.uk/allegroalso check out:
http://en.wikipedia.org/wiki/Allegro_libraryIts open-source, free, and very capable. Has many of the capabilities the Blitz products do (although a little harder to use -- the Blitz products make it all very easy!). Just download it, and add the proper #includes to your C/CPP program, and you are all set... You'll probably need to refer to the Allergro Help and Docs to learn how to use all the functions (statements) and variables it provides though.
Only thing is, I don't remember if it supports DirectX (its been a long time since I did any coding with Allegro)... It might be OpenGL only.