giora
asked on
MFC MDI MetaFiles, EnhancedMetaFiles
Visual C++ 5.0, MDI application:
I tried to paint my window to a CMetaFileDC class, a regular one doesn't work, so I created an Enhanced MetaFile. The problem is that the texts are not saved. On the contrary the graphics are OK, but the text cannot be seen in the result file when I open it. The texts are written with the DrawText(...) function.
- How to fix the text problem: my code is:
mfdc.CreateEnhanced(NULL, "c:\\gir.emf", NULL, "GioGraph\0Graph\0\0" );//creating
pDoc->Data.DrawGraph(&mfdc , MaxSize, DG_METAFILE);//drawing
HENHMETAFILE hemf = mfdc.CloseEnhanced();//get ting handle
- How to work with a regualar-not-enhanced MetaFile - my code is:
mfdc.Create("c:\\gir.wmf") ;//creatin g
pDoc->Data.DrawGraph(&mfdc , MaxSize, DG_METAFILE);//drawing
HMETAFILE hemf = mfdc.Close();//getting handle
I tried to paint my window to a CMetaFileDC class, a regular one doesn't work, so I created an Enhanced MetaFile. The problem is that the texts are not saved. On the contrary the graphics are OK, but the text cannot be seen in the result file when I open it. The texts are written with the DrawText(...) function.
- How to fix the text problem: my code is:
mfdc.CreateEnhanced(NULL, "c:\\gir.emf", NULL, "GioGraph\0Graph\0\0" );//creating
pDoc->Data.DrawGraph(&mfdc
HENHMETAFILE hemf = mfdc.CloseEnhanced();//get
- How to work with a regualar-not-enhanced MetaFile - my code is:
mfdc.Create("c:\\gir.wmf")
pDoc->Data.DrawGraph(&mfdc
HMETAFILE hemf = mfdc.Close();//getting handle
Can you post the code for pDoc->Data.DrawGraph() ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.