Import Graphics Files
Posted: Tue Jul 02, 2013 12:43 am
Is it possible to import a graphics file and display the file using TeeChart? By a graphics file I do not mean a tee file. I am using MFC and MDI. I envision a template which opens files and displays the file in class derived from CView, with code something like this:
Code: Select all
CFileDialog dlg( OPEN, _T("emf wmf jpg png bmp gif"), _T("*.emf; *.wmf; *.jpg; *.png; *.bmp; *.gif"),
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_ENABLESIZING | OFN_EXPLORER,
_T("Graphics Files|*.emf; *.wmf; *.jpg; *.png; *.bmp; *.gif|"));
if (dlg.DoModal() != IDOK || dlg.GetPathName().GetLength() == 0) // Ensure the length of the filename is valid.
{
return;
}
CString csFile = dlg.GetPathName();
m_Chart1.GetImport().LoadFromFile(csFile);