BYTE *pDstBuffer = NULL;
long nDstSize = 0;
HBITMAP bmp;
CxImage image;
image.CreateFromHBITMAP(bmp);
image.Encode(pDstBuffer, nDstSize, CXIMAGE_FORMAT_BMP); // 转为内存
image.Save("D:\test.bmp", CXIMAGE_FORMAT_BMP); // 保存为文件
::DeleteObject(bmp);
BYTE *pDstBuffer = NULL;
long nDstSize = 0;
HBITMAP bmp;
CxImage image;
image.CreateFromHBITMAP(bmp);
image.Encode(pDstBuffer, nDstSize, CXIMAGE_FORMAT_BMP); // 转为内存
image.Save("D:\test.bmp", CXIMAGE_FORMAT_BMP); // 保存为文件
::DeleteObject(bmp);