Where does the bm parameter in GetBitmap(&bm) come from? Shouldn't there be a declaration:

BITMAP bm;

before you do GetBitmap(&bm)?

/Robert