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. How do I print a MsChart control ?

How do I print a MsChart control ?

Scheduled Pinned Locked Moved C / C++ / MFC
question
6 Posts 3 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, 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

    C N 2 Replies Last reply
    0
    • Q Qadddd

      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

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      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

      Q 1 Reply Last reply
      0
      • C Christian Graus

        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

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

        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

        C 1 Reply Last reply
        0
        • Q Qadddd

          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

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          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

          Q 1 Reply Last reply
          0
          • C Christian Graus

            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

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

            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

            1 Reply Last reply
            0
            • Q Qadddd

              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

              N Offline
              N Offline
              nw60312
              wrote on last edited by
              #6

              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

              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