写了一个截图程序,截图功能已经写好,现在的问题是截完图后只有一个位图句柄hBitmap,怎么转成DIB然后保存到剪切板?用的是win32 sdk
------解决思路----------------------
LONG GetBitmapBits( HBITMAP hbmp, // handle to bitmap
LONG cbBuffer, // number of bytes to copy
LPVOID lpvBits // buffer to receive bits);
+
HBITMAP CreateBitmap( int nWidth, // bitmap width, in pixels
int nHeight, // bitmap height, in pixels
UINT cPlanes, // number of color planes
UINT cBitsPerPel, // number of bits to identify color
CONST VOID *lpvBits // color data array);