BITMAPINFO dib;
HDC dc;
BYTE * data;
int w=img->GetWidth();
int h=img->GetHeight();
//img->Draw(GetDC(hWnd),0,0,w*mul,h*mul);
dc=GetDC(hWnd);
data=img->GetData();
memset(&dib,0,sizeof(dib));
dib.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
dib.bmiHeader.biHeight = -h; //Alto
dib.bmiHeader.biWidth = w; //Largo
dib.bmiHeader.biPlanes = 1;
dib.bmiHeader.biBitCount = 3*8;
dib.bmiHeader.biClrUsed = 0;
dib.bmiHeader.biClrImportant = 0;
dib.bmiHeader.biXPelsPerMeter =0;
dib.bmiHeader.biYPelsPerMeter =0;
dib.bmiHeader.biCompression = BI_RGB;
dib.bmiHeader.biSizeImage =0;
if (StretchDIBits(dc,0,0,w,h, 0, 0, w,h, data,&dib, DIB_RGB_COLORS, SRCCOPY)!=h)
{
//...error
}