Print something graphical on a printer
-
Hello, As I still have problem to print my MSChart ActiveX, I should have several work around: 1) Use the MsChart.EditCopy to copy my graph in the clipboard in a metafile format and print it from clipboard 2) capture the part of the dialog screen containing my graph and print it But the question remains the same : how do I print a graphical object ( or a metafile or directly a MSChart) ? And with solution 2), how do I capture this part of my screen, under which form and how do I print it ? Thanks in advance for your help DD
-
Hello, As I still have problem to print my MSChart ActiveX, I should have several work around: 1) Use the MsChart.EditCopy to copy my graph in the clipboard in a metafile format and print it from clipboard 2) capture the part of the dialog screen containing my graph and print it But the question remains the same : how do I print a graphical object ( or a metafile or directly a MSChart) ? And with solution 2), how do I capture this part of my screen, under which form and how do I print it ? Thanks in advance for your help DD
Qadddd wrote: But the question remains the same : how do I print a graphical object ( or a metafile or directly a MSChart) ? A graphical object can be selected into a DC. Just blit it to the printer DC. A metafile can be played back to a DC using
PlayEnhMetaFile
. -
Qadddd wrote: But the question remains the same : how do I print a graphical object ( or a metafile or directly a MSChart) ? A graphical object can be selected into a DC. Just blit it to the printer DC. A metafile can be played back to a DC using
PlayEnhMetaFile
.hello, to be clear in my mind, do you have any code example that perform this kind of operation. I have to say that I am not a specialist in VC++ and that playing with printers (apart some easy prints in text mode) is quite new for me. I looked on the web and found no example for metafile play on a printer DC, they are all destinated to a rect, so a screen so it seems that I can't use this solution. No solution for the screen capture in a rect object that could be printed ? Thanks in advance DD
-
hello, to be clear in my mind, do you have any code example that perform this kind of operation. I have to say that I am not a specialist in VC++ and that playing with printers (apart some easy prints in text mode) is quite new for me. I looked on the web and found no example for metafile play on a printer DC, they are all destinated to a rect, so a screen so it seems that I can't use this solution. No solution for the screen capture in a rect object that could be printed ? Thanks in advance DD
Qadddd wrote: I have to say that I am not a specialist in VC++ You don't have to be. This is basic Win32 API programming. I looked on the web and found no example You looked in the wrong place (or with the wrong search phrase(s)). Try looking at MSDN and the samples there.
-
Qadddd wrote: I have to say that I am not a specialist in VC++ You don't have to be. This is basic Win32 API programming. I looked on the web and found no example You looked in the wrong place (or with the wrong search phrase(s)). Try looking at MSDN and the samples there.
>>You don't have to be. This is basic Win32 API programming. there are so many other things more interesting than printing ... I am just learning and coding in VC++ by myself, the night at home, and loos e so much time on a single problem like this one ... and have some many other things to do ... >>You looked in the wrong place (or with the wrong search phrase(s)). I am not a specialist from the web neither, i use google and then jump in the thousands links or post some question on forums after having searched for a solution in already existing posts. What's the right phrase to print in vc++ an chart produced by an activeX Mschart? Try by yourself and we'll see if you are more lucky or efficient than me ;-) >>Try looking at MSDN and the samples there. there so many articles, the one more complicated than the other. It is simple, when I want to find something in MSDN, I never find it. Print for example, there is no simple doc explaining the right way to do it with a good significative example (at least when you search with their "search for"). another thing, I am coding in vc++, I don't give a damn about article talking of VB or other . Try to find out how to print chart produced by using a MsChart activeX, the only info I found is for VB. Try to search in the newsgroup, this question appear several times for at least 2 years, but there is no answer neither from students nor from microsoft ... Frankly, I don't understand why there is no "Print" method as there is an "EditCopy" method ... or at least the explanation to do it. DD