I'm drawing some arrows on top of my series using teechart canvas. Then I export the teechart as JPEG or BMP. But the arrows do not appear in the images. What should be done to get the image with the canvas drawings in it?
Function I used for drawing arrow:
m_tChart.GetCanvas().Arrow(TRUE, x, y+20, x, y, 5, 5, 0);
Function I used for creating BMP file:
m_tChart.GetExport().GetAsBMP().SaveToFile((LPCTSTR)fileName);
Some of the posts in the forum suggest putting canvas drawings into OnAfterDraw method. But in my version of teechart, I could not find OnAfterDraw method in any of the .h files.
Canvas drawings not shown in BMP image
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi psahay,
Please have a look at the examples at C:\Program Files\Steema Software\TeeChart Pro v6 ActiveX Control\Examples\Visual C++\Version 6 (default english installation path). Some of them use TeeChart's OnAfterDraw event.
Please have a look at the examples at C:\Program Files\Steema Software\TeeChart Pro v6 ActiveX Control\Examples\Visual C++\Version 6 (default english installation path). Some of them use TeeChart's OnAfterDraw event.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcis,
I added the OnAfterDraw method like this, but this method never gets invoked.
in .h file:
protected:
DECLARE_EVENTSINK_MAP()
in .cpp file:
BEGIN_EVENTSINK_MAP(CClockDataBaseWindow, CWnd)
//{{AFX_EVENTSINK_MAP(CClockDataBaseWindow)
ON_EVENT(CClockDataBaseWindow, IDC_TCHART1, 1 /* OnAfterDraw */, OnOnAfterDrawTchart1, VTS_NONE)
//}}AFX_EVENTSINK_MAP
END_EVENTSINK_MAP()
void CClockDataBaseWindow::OnOnAfterDrawTchart1()
{
// canvas drawing code
}
I added the OnAfterDraw method like this, but this method never gets invoked.
in .h file:
protected:
DECLARE_EVENTSINK_MAP()
in .cpp file:
BEGIN_EVENTSINK_MAP(CClockDataBaseWindow, CWnd)
//{{AFX_EVENTSINK_MAP(CClockDataBaseWindow)
ON_EVENT(CClockDataBaseWindow, IDC_TCHART1, 1 /* OnAfterDraw */, OnOnAfterDrawTchart1, VTS_NONE)
//}}AFX_EVENTSINK_MAP
END_EVENTSINK_MAP()
void CClockDataBaseWindow::OnOnAfterDrawTchart1()
{
// canvas drawing code
}
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi psahay,
Have you looked at the examples I pointed you in my previous post?
Have you looked at the examples I pointed you in my previous post?
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |