|
-
May 10th, 1999, 11:08 AM
#1
Consistent Copying to Word & PowerPoint
How can I copy the graphical output from my program to various programs. I copied code posted here and got it to work somewhat, but every program seems to treat the object differently. The size comes out differently when I put it into Word than when I put it into PowerPoint.
CMetaFileDC * m_pMetaDC = new CMetaFileDC();
m_pMetaDC->CreateEnhanced(GetDC(), NULL, NULL, "QP");
m_pMetaDC->SetMapMode(MM_HIENGLISH); //how I scale my graphics
OnDraw(m_pMetaDC); //draw meta file
//close meta file dc and prepare for clipboard;
HENHMETAFILE hMF = m_pMetaDC->CloseEnhanced();
//copy to clipboard
OpenClipboard();
EmptyClipboard();
::SetClipboardData(CF_ENHMETAFILE,hMF);
CloseClipboard(); //DeleteMetaFile
delete m_pMetaDC;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|