
Printer.PaintPicture & EM_FORMATRANGE
Sergey while you are probably right in assuming the issue is related to
the newer versions of the control here are a couple of options to test:
1) Change your Printer Driver's output option type to RAW instead of EMF
or reverse the current setting. I have seen this fix this type of issue,
particularly on HP printers.
2) Output from the control using the EM_FORMATRANGE to a Enhanced
Metafile Device Context. Then blit from your picture to the Metafile DC.
Finally render the Metafile DC directly to the Printer. Something like
that..<grin>
--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
Quote:
> Please HELP!!!! (spent too mach time on this already without any
success)
> I'm printing formatted text from richedit 2.0 with EM_FORMATRANGE
message
> and on the same page I'm printing picture with Printer.PaintPicture
method.
> Problem: Page rectangle (from FORMATRANGE structure) covers up a part
of the
> page and erases PaintPicture printing. I tried to print picture
outside the
> FORMATRANGE page rectangle - it comes out fine, but I NEED it to be
printed
> within the FORMATRANGE page rectangle.
> It used to work with VB RichTextBox (based on RichEdit 1.0) but
doesn't work
> with later version of RichEdit. I've made a lot of changes in the
program,
> using RichEdit 2.0 features and can not upgrade the program because of
this
> problem
> Thanks in advance
> Sergey O