Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Print something graphical on a printer

Print something graphical on a printer

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelpcomdata-structures
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    Qadddd
    wrote on last edited by
    #1

    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

    M 1 Reply Last reply
    0
    • Q Qadddd

      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

      M Offline
      M Offline
      Mike Nordell
      wrote on last edited by
      #2

      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.

      Q 1 Reply Last reply
      0
      • M Mike Nordell

        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.

        Q Offline
        Q Offline
        Qadddd
        wrote on last edited by
        #3

        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

        M 1 Reply Last reply
        0
        • Q Qadddd

          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

          M Offline
          M Offline
          Mike Nordell
          wrote on last edited by
          #4

          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.

          Q 1 Reply Last reply
          0
          • M Mike Nordell

            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.

            Q Offline
            Q Offline
            Qadddd
            wrote on last edited by
            #5

            >>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

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups