用这个试试:
int SetDIBits(
  HDC hdc,                  // handle to DC
  HBITMAP hbmp,             // handle to bitmap
  UINT uStartScan,          // starting scan line
  UINT cScanLines,          // number of scan lines
  CONST VOID *lpvBits,      // array of bitmap bits
  CONST BITMAPINFO *lpbmi,  // bitmap data
  UINT fuColorUse           // type of color indexes to use
);