dlgPlot.cpp in StockDataParse.rar
Sponsored links
// dlgPlot.cpp : implementation file
//
#include "stdafx.h"
#include "StockDataParse.h"
#include "dlgPlot.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// dlgPlot dialog
dlgPlot::dlgPlot(CWnd* pParent /*=NULL*/)
: CDialog(dlgPlot::IDD, pParent)
{
//{{AFX_DATA_INIT(dlgPlot)
m_uiStartTime = 19990101;
m_uiStopTime = 20050101;
//}}AFX_DATA_INIT
}
void dlgPlot::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(dlgPlot)
DDX_Control(pDX, IDC_STATIC_PLOT, m_PLOT_SHOW);
DDX_Text(pDX, IDC_EDIT1, m_uiStartTime);
DDV_MinMaxUInt(pDX, m_uiStartTime, 19900000, 20090101);
DDX_Text(pDX, IDC_EDIT2, m_uiStopTime);
DDV_MinMaxUInt(pDX, m_uiStopTime, 20000000, 20091010);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(dlgPlot, CDialog)
//{{AFX_MSG_MAP(dlgPlot)
ON_WM_PAINT()
ON_BN_CLICKED(IDC_BTN_REPLOT, OnBtnReplot)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// dlgPlot message handlers
int dlgPlot::PlotKLine()
{
CDC* pDC;
//CWnd* pAppFrame =AfxGetApp()->m_pMainWnd;
//pDC =GetDesktopWindow( )->GetDC();
// pDC = pAppFrame->get->GetDC();//->GetWindowDC();
//pDC = GetWindowDC();
/*
pDC = m_PLOT_SHOW.GetWindowDC();
pDC=CWnd::GetDC();*/
pDC=m_PLOT_SHOW.GetWindowDC();
/*
CRect RectClient,Workarea;
GetClientRect(RectClient);
const int iClientRatio = 20;
const int iWorkareaRatio = 10;
Workarea.left=RectClient.left + RectClient.Width()/iClientRatio;
Workarea.right=RectClient.right-RectClient.Width()/iClientRatio;
Workarea.top=RectClient.top - RectClient.Height()/iClientRatio/2;
Workarea.bottom=RectClient.bottom-RectClient.Height()/iClientRatio;
//draw price
std::list<float> myfList ;*/
// DrawDCMap(pDC,W
...
...
... to be continued.
This is a preview. To get the complete source file,
please click here to download the whole source code package.