标签:dwr format cimage amp code mon lock ase test
CImage image; image.Load(_T("1.jpg")); //HBITMAP hBitmap=image.Detach(); HGLOBAL m_hMem = GlobalAlloc(GMEM_MOVEABLE, 0); IStream *pstm=NULL; CreateStreamOnHGlobal(m_hMem, TRUE, &pstm); image.Save(pstm,ImageFormatBMP); LARGE_INTEGER liBeggining = { 0 }; pstm->Seek(liBeggining, STREAM_SEEK_SET, NULL); DWORD size = GlobalSize(m_hMem); LPBYTE lpData = (LPBYTE)GlobalLock(m_hMem); CFile BMPfile(L"11.bmp",CFile::modeReadWrite | CFile::modeCreate); BMPfile.Write (lpData,size); BMPfile.Close(); pstm->Release(); GlobalUnlock(m_hMem);
http://bbs.csdn.net/topics/370241566
标签:dwr format cimage amp code mon lock ase test
原文地址:http://www.cnblogs.com/wainiwann/p/7087180.html