For playback generally you would use a directshow filter or directly interface with a decoder rather than using VfW codecs.
You might want to start by looking at say Media Player Classic's source code. You could also look at using xvidcore.dll directly, but then your player could only decode XviD video, plus you would need to write a demuxer to parse it. This could all be solved by using libavcodec/format.
You could find it by searching, but http://sourceforge.net/projects/guliverkli/ although there are some newer developments going on elsewhere. To compile it you will need MSVC 2005. It is written in C++, although most of the libs it is based on (mod, tremor, etc.) are pure C.
You could also check out the directshow samples that used to be part of the DX SDK, then platform SDK, now Win SDK or whatever. Plenty of other source for various directshow based apps to.
Could also check out VLC, mplayer, ffplayer, osmo4, etc. which all make use of libavcodec/format for playback.