Displaying an Image (C++)
This function displays an image at coordinates x, y in a display context:
void DisplayImg(HDC hDC, int x, int y)
{
int w,h;
LPBITMAPINFO lpbi;
unsigned char *bits;
GetImgSize(img,&w,&h);
lpbi=GetImgBitmapInfo(img);
bits=GetImgBitmap(img);
StretchDIBits(hDC, x, y, w, h, 0, 0, w, h, bits, lpbi, DIB_RGB_COLORS,SRCCOPY);
}