Jump to content
Software FX Community

Re: Issue with Fixed Legend during Print Preview - Oops!

User (Legacy)

Recommended Posts

Oops - sorry about that post of the big bmp file.  Let's try again... 


I'm using VC++ 6.0 and MFC and creating the ChartFX control dynamically on a

cFormView or cScrollView via:


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 the attached file.

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


This topic is now archived and is closed to further replies.

  • Create New...