How do I print a MsChart control ?
-
Hello, In order to display some graphic stats (bars, pies, ...), I integrated a MsChart in a dialog and I works fine. But now, I would like to be able to print this chart, so how can I do this ? Thanks in advance. DD
I dunno if there is some other way, but you could certainly get the DC of the control and pass it to the printer DC. Christian I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
-
I dunno if there is some other way, but you could certainly get the DC of the control and pass it to the printer DC. Christian I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
-
hello, thanks for answer, but as I am a quite new in VC++, I have to admit that I am not sure to understand your explanation and that I need some more details or even example/part of code. Thanks DD
Do you know how to print at all ? If not, you should probably check out some articles on the site. That's a lot of info to impart in a forum post. Christian I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
-
Do you know how to print at all ? If not, you should probably check out some articles on the site. That's a lot of info to impart in a forum post. Christian I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
I can't say I am an expert in printing (for sure), I have just printed the content of a RichEditText control, so I have the basis to do it. But there are a lot of ways to perform a print depending of a lot of facts (control type, etc). I found a way to do it using the clipboard, but is there any other simplier way ? DD
-
Hello, In order to display some graphic stats (bars, pies, ...), I integrated a MsChart in a dialog and I works fine. But now, I would like to be able to print this chart, so how can I do this ? Thanks in advance. DD
I did this awhile back. I tried the grab the DC approach and had limited success. I ended up using the clipboard approach, the control copies a WMF image to the clipboard. I really disliked this approach but it seemed to be the prescribed approach. If you want send me an e-mail to nwilhelmi@attbi.com and I can send you some code when I get home. The app was done with WTL so it will be WIN32api based and not MFC based. NW