Re: missing text using PlayEnhMetaFile in IE print DC



Not sure I have an answer, but you could use my MetaFile Explorer to see what is in the
metafile. This may suggest what is going on.
joe

On Tue, 22 Jul 2008 02:00:00 -0700, Ralf Berger <RalfBerger@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:

hi Everybody,

this is a follow-up issue on a thread which has been discussed earlier.
The last hints I received came in from Jeffrey Tan [MSFT] on May 26 2006.

It has never beed solved, and some customer requests require me to follow-up
on this.

Let me resume what we had so far.

We use the below code snippet to let an ActiveX control embedded in IE draw
a metafile.

BOOL CEmfViewCtrl::MetaPrint( HDC hDC, LPRECT rc )
{
HENHMETAFILE hEMF = NULL;
BOOL bRet = FALSE;

if ( (hDC != NULL) && (rc != NULL) && (m_hEmf != NULL) )
{
bRet = PlayEnhMetaFile( (HDC)hDC, m_hEmf, rc );
}
return bRet;

}

void CEmfViewCtrl::OnDraw(
CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid)
{
// TODO: Replace the following code with your own drawing code.
pdc->FillRect(rcBounds,
CBrush::FromHandle((HBRUSH)GetStockObject(WHITE_BRUSH)));

CRect rc = rcBounds; //here we get the size of the control
//this can be larger than the desktop size
MetaPrint( pdc->GetSafeHdc(), rc );

}

When it comes to printing IE's html page it seems like the pdc offered in
OnDraw is limited to the screen resulution. When I use that dc to play the
metafile (which size is based on the html object size) I run into the issue
that some text element get dropped on the resulting printout.

Some more details can be found if you walk to the old thread...

Any more recent hints how to overcome that limited DC are highly appreciated.
.



Relevant Pages

  • Re: missing text using PlayEnhMetaFile in IE print DC
    ... the tool wich is causing that issue is an ActiveX control wich displays the ... metafile in the printer's preview or on the printout some text elements are ... metafile (which size is based on the html object size) I run into the issue ...
    (microsoft.public.win32.programmer.gdi)
  • Re: missing text using PlayEnhMetaFile in IE print DC
    ... the tool wich is causing that issue is an ActiveX control wich displays the ... metafile in the printer's preview or on the printout some text elements are ... We use the below code snippet to let an ActiveX control embedded in IE draw ... metafile (which size is based on the html object size) I run into the issue ...
    (microsoft.public.win32.programmer.gdi)

Loading