Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Scientific charting control

, 17 Jan 2005
Multi-purpose scientific charting control.
xgraph_bin.zip
XGRAPH10.dll
XGraphTest.exe
xgraph_demo.zip
Include
Release
res
bitmap1.bmp
bs1.bmp
bs2.bmp
bs3.bmp
bs4.bmp
bs5.bmp
Toolbar.bmp
XGraphTest.ico
XGraphTestDoc.ico
XGRAPH10.lib
XGRAPH10d.lib
XGraphTest.clw
XGraphTest.dsp
XGraphTest.dsw
XGRAPH10.dll
bitmap2.bmp
default1.bin
Logo.bmp
Screen1.bmp
xgraphtest
xgraph_src.zip
XGraph.clw
xgraph.def
XGRAPH.dsw
XGRAPH.dsp
bitmap1.bmp
bs1.bmp
bs2.bmp
bs3.bmp
bs4.bmp
bs5.bmp
lib
XGRAPH10.dll
XGRAPH10.exp
XGRAPH10.lib
// PropertyView.cpp: Implementierungsdatei
//

#include "stdafx.h"
#include "XGraphTest.h"
#include "XGraphTestDoc.h"
#include "XGraphTestView.h"
#include "PropertyView.h"
#include "MainFrm.h"
#include "math.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CPropertyView
 
IMPLEMENT_DYNCREATE(CPropertyView, CFormView)

CPropertyView::CPropertyView()
	: CFormView(CPropertyView::IDD)
{
	//{{AFX_DATA_INIT(CPropertyView)
	m_cInfo = _T("");
	//}}AFX_DATA_INIT
}

CPropertyView::~CPropertyView()
{
}

void CPropertyView::DoDataExchange(CDataExchange* pDX)
{
	CFormView::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CPropertyView)
	DDX_Text(pDX, IDC_INFO, m_cInfo);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CPropertyView, CFormView)
	//{{AFX_MSG_MAP(CPropertyView)
	ON_BN_CLICKED(IDC_RADIO1, OnSelect)
	ON_BN_CLICKED(IDC_RADIO2, OnZoom)
	ON_BN_CLICKED(IDC_RADIO3, OnPan)
	ON_BN_CLICKED(IDC_RADIO4, OnCursor)
	ON_BN_CLICKED(IDC_RADIO5, OnEdit)
	ON_BN_CLICKED(IDC_RADIO6, OnMeasure)
	ON_BN_CLICKED(IDC_BUTTON6, OnInsertLabel)
	ON_BN_CLICKED(IDC_BUTTON8, OnResetAll)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// Diagnose CPropertyView

#ifdef _DEBUG
void CPropertyView::AssertValid() const
{
	CFormView::AssertValid();
}

void CPropertyView::Dump(CDumpContext& dc) const
{
	CFormView::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// Behandlungsroutinen f�r Nachrichten CPropertyView 



void CPropertyView::OnSelect() 
{
	CXGraphTestView* pView = (CXGraphTestView*)((CMainFrame*)AfxGetMainWnd())->m_wndSplitter.GetPane(0,0);

	pView->m_Graph[0].NoOp();

	m_cInfo = _T("Use the mouse to select objects like axes, curves, ..."); UpdateData(FALSE);

	
}

void CPropertyView::OnZoom() 
{
	CXGraphTestView* pView = (CXGraphTestView*)((CMainFrame*)AfxGetMainWnd())->m_wndSplitter.GetPane(0,0);
	pView->m_Graph[0].Zoom();
	
	m_cInfo = _T("Use the mouse to define an area to zoom in."); UpdateData(FALSE);
	
}

void CPropertyView::OnPan() 
{
	CXGraphTestView* pView = (CXGraphTestView*)((CMainFrame*)AfxGetMainWnd())->m_wndSplitter.GetPane(0,0);
	pView->m_Graph[0].Pan();
	m_cInfo = _T("Use the mouse to pan the curves."); UpdateData(FALSE);
	
}

void CPropertyView::OnCursor() 
{
	CXGraphTestView* pView = (CXGraphTestView*)((CMainFrame*)AfxGetMainWnd())->m_wndSplitter.GetPane(0,0);
	pView->m_Graph[0].Cursor();
	m_cInfo = _T("Use the mouse to move the cursor left and right. The second chart will be synchronised. Use the left mousebutton to insert a data annotation"); UpdateData(FALSE);
	
}

void CPropertyView::OnEdit() 
{
	CXGraphTestView* pView = (CXGraphTestView*)((CMainFrame*)AfxGetMainWnd())->m_wndSplitter.GetPane(0,0);
	pView->m_Graph[0].Edit();
	m_cInfo = _T("Use the mouse to edit the curve-points. Zoom in before"); UpdateData(FALSE);
	
}

void CPropertyView::OnMeasure() 
{
	CXGraphTestView* pView = (CXGraphTestView*)((CMainFrame*)AfxGetMainWnd())->m_wndSplitter.GetPane(0,0);
	pView->m_Graph[0].Measure();
	m_cInfo = _T("Use the mouse to measure the distance between two points."); UpdateData(FALSE);
	
}

void CPropertyView::OnInsertLabel() 
{
	CXGraphTestView* pView = (CXGraphTestView*)((CMainFrame*)AfxGetMainWnd())->m_wndSplitter.GetPane(0,0);
	pView->m_Graph[0].InsertLabel();
	pView->m_Graph[0].Invalidate();
	
}

void CPropertyView::OnResetAll() 
{
	CXGraphTestView* pView = (CXGraphTestView*)((CMainFrame*)AfxGetMainWnd())->m_wndSplitter.GetPane(0,0);
	pView->m_Graph[0].ResetZoom();
	
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Gunnar Bolle
Web Developer
Germany Germany
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150327.1 | Last Updated 17 Jan 2005
Article Copyright 2002 by Gunnar Bolle
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid