Jump to content
Software FX Community

Problems with having ChartFx draw itself to CDC


User (Legacy)
 Share

Recommended Posts

Hello,

I seem to be having problems when I ask ChartFX to draw itself onto a

CDC. It appears to drawn only the chart area within the size of the CDC and

labels and titles appear to be drawn outside of that area. ( See attached

pic ). Is there a way to ensure that the entire contents of the chart is

displayed within a certain sized CDC or to ask ChartFX how much size is

needed to display the axis labels and resize things appropriately?

-Mac

Link to comment
Share on other sites

The CDC is the whole thing not just the rectangle that you are drawing in

red.

You can not draw outside of a device context, if you do it simply wont show

at all.

I don't quite understand what you are trying to do, but CDC is an MFC class

that wraps a Device Context. We know about Device Contexts, if you use the

Paint method, you can give us a DC and we draw on it at the coordinates that

you specify (the whole chart, including legends, titles, axis, etc.).

--

FP

Software FX

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...