⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 realtime.h

📁 程序经过了调试,直接运行就可以显示结果,为股市应用程序,VC++的
💻 H
字号:
#if !defined(AFX_REALTIME_H__93BC396A_9EA4_4F84_9CCB_CC2280C625F9__INCLUDED_)
#define AFX_REALTIME_H__93BC396A_9EA4_4F84_9CCB_CC2280C625F9__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Realtime.h : header file
//
#include "Data.h"
#include <afxwin.h>
#include <Windows.h>

class CStockDoc;

/////////////////////////////////////////////////////////////////////////////
// CRealtime view

class CRealtime : public CView
{
	           
protected:

      static float      m_fclose;
      static float      m_fhighest;
      static float      m_flowest;
      static CData      realdata;
      static int		  m;										//横坐标(分钟数)
      static float	  M;										//最大偏移量
      static float	  VolMax;									//最大实时成交量								
      static int		  Point[14400][2];                    	    //对应的坐标值
      static int		  PointAver[14400][2];						//加权平均线的点
      static float	  Vol[14400];								//算出的成交量
      static int		  VPoint[14400][2];							//对应的成交量线坐标值
      static int        xPos;
      static int        xPrev;
      static CString    m_sLastName;
      static float      VolThis;
	  static float      VolLast;
public:

	  CRealtime();
	  DECLARE_DYNCREATE(CRealtime)
      virtual ~CRealtime();

public:

     void	  GetData(CData& Data);
     CStockDoc* GetDocument();
		
protected:

	virtual void OnDraw(CDC* pDC);      
	

// Implementation
protected:
	void DrawBkgLine(CDC* pDC);
	void DrawRealLine(CDC* pDC);
	void Keymove();
	void ReStart();
	void Refresh();
	void Exchange();					//"分时线" 价格到坐标值的转换//重新开始一天的DayLine
	void ExchangeA();					//"分时线" 价格,成交量到加权平均线坐标的转换
	void ExchangeV();                   //"分时线" 成交量到坐标值的转换
	void ProcessData();
	void Culculate();
protected:
	
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	
protected:
	
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnKeyDown( UINT nChar, UINT nRepCnt, UINT nFlags );
	afx_msg void OnKeyUp( UINT nChar, UINT nRepCnt, UINT nFlags );

	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_REALTIME_H__93BC396A_9EA4_4F84_9CCB_CC2280C625F9__INCLUDED_)

⌨️ 快捷键说明

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