Well, if you know winapi, it should be easy to do, but apperantly you don't...
1) a C tutorial:
http://cplus.about.com/od/beginnerctutoria1/l/blctut.htm
2) a WinApi tutorial:
http://winprog.net/tutorial/
3) subclassing:
http://www.rpsoftware.net/old/tutorials.php?page=subclass
Follow those tutorials and you should be fine.