There are a no of games with free released source code. eg Doom I,Freecraft (like warcraft from Blizzard),Dink Smallwood(A great RPG),Duke Nukem 3d(old) etc. Yes, they are available for free downloads ,I got them from a no. of Magazine CDs.
Most of them are written in C/C++ programming language. But beware the source code wont be simple to understand; there will be thousands of C/C++ source code files.Now-a-days most windows games are written in DirectX, (If you know MFC it'll be easy learn DirectX). Game programming looks very interesting but it is very difficult to do.
I would suggest you to (as a first step) develop games using game dev tools like GameMaker (Only for arcade games but is very simple to program: just drag-drop and little bit of coding like
VB).
Happy game programming in advance!!