View Single Post
Go4Expert Founder
13Feb2007,09:24  
shabbir's Avatar
I see a definite problem here

BITMAP BitMap;

Variable is declared but not initialized

temp.GetBitmap(&BitMap);

GetBitmap should not work to the variable which is not initilaized

oldBmp = mem.SelectObject(&temp);

Obvious reason is it should fail

On some systems the garbage for BitMap may not be NULL.