"KlausK" <
[hidden email]> wrote in message
news:
[hidden email]...
> I need a kick of how to print a MSChart diagram out of an AXControlSite. I
> tried to put the canvas from the AXControlSite into the printerCanvas via
> the nonOwnedDC: method.
...
Take a look at this article, it may help you:
http://www.codeproject.com/com/WirgerPrintArticle.aspThe code bellow is _not_ really a good way to do this. There are some
interesting nuances to it. For some reason if there are any Dolphin windows
over the canvas being copied they will be included and if there are
non-Dolphin windows over it then there will be white space overlaid. This
seems contrary to the advertised default behavior of the API. Can anyone
explain this? These issues are enough to render this a rather kuldgey
approach. The code bellow renders to a bitmap, you could adapt it to write
to a PrinterCanvas. A technique from the above article would probably be
much better than this.
==========
up := URLPresenter showOn: '
http://www.google.com'.
"Wait for IE to load the site, then evaluate the lines bellow, and paste
into Paint."
up setFocus.
viewCanvas := up view canvas.
bitmap := Bitmap compatible: viewCanvas extent: up view extent.
bitmapCanvas := bitmap canvas.
bitmapCanvas backcolor: Color white.
bitmapCanvas erase.
bitmapCanvas bitBlt: viewCanvas rectangle: viewCanvas clipBox to: 0@0 rop:
13369376 "SRCCOPY".
bitmap copyToClipboard.
==========
Chris