metafile to bitmap
-
Create a DIB section and a memory DC, select the DIB section into the memory DC, play the metafile into memory DC, now you got a bitmap in the DIB section. http://www.amazon.com/exec/obidos/ASIN/0130869856
-
Create a DIB section and a memory DC, select the DIB section into the memory DC, play the metafile into memory DC, now you got a bitmap in the DIB section. http://www.amazon.com/exec/obidos/ASIN/0130869856
thanks for you both. I am not good in graphic design. I have some code here. I am trying to save Meta to BMP. But I only get black area. please help. larry if ( OpenClipboard() ) { HENHMETAFILE handle = (HENHMETAFILE)GetClipboardData(CF_ENHMETAFILE); CClientDC dc(this); CRect client(0,0,500,500); CBitmap * bmf = new CBitmap(); CDC mdc; mdc.CreateCompatibleDC(&dc); bmf->CreateCompatibleBitmap(&dc,client.Width(),client.Height()); PlayEnhMetaFile(dc, handle, &client); dc.SelectObject(bmf); SetClipboardData(CF_BITMAP,bmf->m_hObject); CloseClipboard(); }
-
thanks for you both. I am not good in graphic design. I have some code here. I am trying to save Meta to BMP. But I only get black area. please help. larry if ( OpenClipboard() ) { HENHMETAFILE handle = (HENHMETAFILE)GetClipboardData(CF_ENHMETAFILE); CClientDC dc(this); CRect client(0,0,500,500); CBitmap * bmf = new CBitmap(); CDC mdc; mdc.CreateCompatibleDC(&dc); bmf->CreateCompatibleBitmap(&dc,client.Width(),client.Height()); PlayEnhMetaFile(dc, handle, &client); dc.SelectObject(bmf); SetClipboardData(CF_BITMAP,bmf->m_hObject); CloseClipboard(); }