cfxxychart.cpp

来自「Delphi Component - Chart Fx」· C++ 代码 · 共 76 行

CPP
76
字号
// CfxXYChart.cpp : implementation file
//

#include "stdafx.h"
#include "cfx98.h"
#include "CfxXYChart.h"

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

/////////////////////////////////////////////////////////////////////////////
// CCfxXYChart dialog


CCfxXYChart::CCfxXYChart(CWnd* pParent /*=NULL*/)
	: CDialog(CCfxXYChart::IDD, pParent)
{
	//{{AFX_DATA_INIT(CCfxXYChart)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CCfxXYChart::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CCfxXYChart)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP


	// ***CFX***
	// Do not use class wizard to generate these. It will cause the generation of unecesary classes
	DDX_Control(pDX, IDC_CHART1, m_ChartFX);
	if (!pDX->m_bSaveAndValidate) // Link Chart FX pointer to control window
		m_pChartFX = m_ChartFX.GetControlUnknown();
	// ***CFX***

}


BEGIN_MESSAGE_MAP(CCfxXYChart, CDialog)
	//{{AFX_MSG_MAP(CCfxXYChart)
	ON_BN_CLICKED(IDC_XVALUES, OnXvalues)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCfxXYChart message handlers

BOOL CCfxXYChart::DestroyWindow() 
{
	// TODO: Add your specialized code here and/or call the base class
	m_pChartFX = NULL;

	return CDialog::DestroyWindow();
}

void CCfxXYChart::OnXvalues() 
{
    int i;
    
    
    m_pChartFX->OpenDataEx(COD_XVALUES, 1, 10);
    for(i=0;i<10;i++)
		m_pChartFX->XValueEx[0][i] = i * i;
 
	m_pChartFX->CloseData((CfxCod) (COD_XVALUES|COD_SMOOTH));
    
	
	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?