Code:
#include <windows.h>
#include <vfw.h>
#include <string>
#include <fstream>
#include <iomanip>

using namespace std;

class Video {

	public:
		Video(string path, HDC hdc, int nw);
		~Video();
		void showFrame(long frame);
		
	private:
		PAVIFILE aviFile;
		PAVISTREAM aviStream;
		AVISTREAMINFO aviStreamInfo;
 		BITMAPINFOHEADER bmih;	
 		LPBITMAPINFOHEADER lpbi;
 		PGETFRAME pgf;
		unsigned char* pdata;
		HDRAWDIB hdd;
		HDC drawdc;
		int width, height, newwidth, newheight;
		double fps, duration;
		int length;
		
};

Video::Video(string path, HDC hdc, int nw) {

	ofstream fout("video.log");

	// initialise the AVI file library
	// and open the video file/stream
	AVIFileInit();
	AVIFileOpenA(&aviFile, path.c_str(), OF_READ, NULL);	
	AVIFileGetStream(aviFile, &aviStream, streamtypeVIDEO, 0);
	AVIStreamInfo(aviStream, &aviStreamInfo, sizeof(aviStreamInfo));

	// get video stream data
	width = aviStreamInfo.rcFrame.right - aviStreamInfo.rcFrame.left;
	height = aviStreamInfo.rcFrame.bottom - aviStreamInfo.rcFrame.top;
	DWORD aa = aviStreamInfo.fccHandler;
	fps = double(aviStreamInfo.dwRate) / double(aviStreamInfo.dwScale);
	length = aviStreamInfo.dwLength;
	duration = double(length) / fps;

	// figure out the destination width/height
	newwidth = nw;
	newheight = int(nw * double(height / double(width)));

	// set up the destination bitmap
	bmih.biSize	= sizeof(BITMAPINFOHEADER);
	bmih.biPlanes = 1;
	bmih.biBitCount	= 24;					
	bmih.biWidth = newwidth;
	bmih.biHeight = newheight;
	bmih.biCompression = BI_RGB;				

	// debug
	fout << "stream size: " << width << "x" << height << endl;
	fout << "dest. size: " << newwidth << "x" << newheight << endl;
	fout << "fourcc: " << (char)(aa & 0xff) << endl;	
	fout << "framerate: " << setprecision(3) << fps << endl;
	fout << "length: " << setprecision(3) << fixed
		<< duration << "s (" << length << " frames)" << endl;

	// open the stream for reading
	pgf = AVIStreamGetFrameOpen(aviStream, NULL);

	// create the bitmap and attach it to the dc
	//data = 0;
	//cdc = CreateCompatibleDC(0);
	//hBitmap = CreateDIBSection(cdc, (BITMAPINFO*)(&bmih), DIB_RGB_COLORS,
	//	(void**)(&data), NULL, 0);
	//hOld = (HBITMAP)SelectObject(cdc, hBitmap); 
	
	// create the "drawdib" and store the DC	
	hdd = DrawDibOpen();
	drawdc = hdc;
	
}

Video::~Video() {

	DrawDibClose(hdd);
//	SelectObject(drawdc, hOld);
//	DeleteObject(hBitmap);

	AVIStreamGetFrameClose(pgf);	
	AVIFileRelease(aviFile);
	AVIFileExit();	

}

void Video::showFrame(long frame) {

	lpbi = (LPBITMAPINFOHEADER)AVIStreamGetFrame(pgf, frame);
	pdata = (unsigned char*) lpbi + sizeof(BITMAPINFOHEADER);
	DrawDibDraw(hdd, drawdc, 0, 0, newwidth, newheight, 
		lpbi, pdata, 0, 0, width, height, 0);
	//BitBlt(drawdc, 0, 0, newwidth, newheight, cdc, 0, 0, SRCCOPY);

}
Any thoughts on why using this class just refuses to blit anything?
You use it like:
Code:
Video a("my.avi", hDC, 500) // 500 is the width of the image
a.showFrame(50);