Jump to content
Software FX Community

Issue with Fixed Legend during Print Preview


User (Legacy)
 Share

Recommended Posts

Frank,

I'm using VC++ 6.0 and MFC and creating the ChartFX control dynamically on a cFormView or cScrollView via:

m_ChartFXWnd.CreateControl(...)

m_pChartFX = m_ChartFXWnd.GetControlUnknown();

The chart is created dynamically, the legend is fixed, but not at the bottom taking the whole width of the graph, but rather just above the bottom, centered, and below the graph

like this:

One problem I'm having is that during PrintPreview, the legend is not maintaining it's relative position to the graph itself, but rather it seems to be maintaining its position relative to the left and top of the graph, at the same distance it was before zooming in. Said another way: As I zoom in, the graphs scales (gets bigger) accordingly, but the legend does not.

In MFC's Print/Print Preview architecture, one normally responds to cFormView's or cScrollView's OnPrint command, at which time I'm using ChartFX's Paint command as in:

m_pChartFX->Paint((long) (pDC->m_hDC), Rect.left, Rect, Rect, Rect, (CfxChartPaint) (CPAINT_PRINT), 0);

The printed graph has the legend in the correct place.

Thanks for any help you can give me on this,

Craig Murray

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