📄 curverdemoview.h
字号:
// CurverDemoView.h : interface of the CCurverDemoView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_CURVERDEMOVIEW_H__7FFE574C_4883_4BB3_B5BB_C5AA893916A8__INCLUDED_)
#define AFX_CURVERDEMOVIEW_H__7FFE574C_4883_4BB3_B5BB_C5AA893916A8__INCLUDED_
#include "HoverEdit.h"
#include "AutoFont.h"
#include "Digistatic.h"
#include "DigiUtil.h"
#include "cdxCDynamicDialog.h"
#include "XPButton.h"
#include "MsgSelDlg.h"
#define GRAPH_LEFT 109 //曲线图位置
#define GRAPH_TOP 143-45 //曲线图位置
#define GRAPH_RIGHT 935 //曲线图位置
#define GRAPH_BOTTOM 625-45 //曲线图位置
#define GRAPH_LEFT_MARGIN 69 //曲线图左边距
#define GRAPH_RIGHT_MARGIN 37 //曲线图右边距
#define GRAPH_TOP_MARGIN 30 //曲线图顶边距
#define GRAPH_BOTTOM_MARGIN 30 //曲线图底边距
#define GetRandom( min, max ) ((rand() % (int)(((max)+1) - (min))) + (min))
struct ItemMsg{
CString szId;
CString szName; //设备名称标示
float fHisVal[720]; //历史记录数据,用于曲线记录
};
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "AboutMsgDlg.h"
#include "DataSaveWnd.h" // Added by ClassView
typedef enum tagSYSTEMTYPE{MAIN,CURVE,ABOUT};
class CCurverDemoView : public CView
{
protected: // create from serialization only
CCurverDemoView();
DECLARE_DYNCREATE(CCurverDemoView)
// Attributes
public:
CCurverDemoDoc* GetDocument();
tagSYSTEMTYPE m_SysType;
CDigiStatic m_EditMsg;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCurverDemoView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual void OnInitialUpdate();
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CCurverDemoView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
CAboutMsgDlg *m_pAboutMsgDlg;
CAutoFont * m_pFnt, * m_pFntNew;
CHoverEdit m_LineMsgEdit;//信息提示窗口
CHoverEdit m_LineDataEdit;
CRect m_LineDataRect;
CRect m_LineMsgRect;
CRect m_EditMsgRect;
ItemMsg *m_ItemMsg;
CDatabase db;
int nTolCount;
int nPointSize;
// Generated message map functions
protected:
CDataSaveWnd m_DataWnd;
void DrawRealCurve();
BOOL ReadHisMsgFromFile(CString szYear, CString szMonth, CString szDay);
void InitbufferVal();
void CreateDevice();
//{{AFX_MSG(CCurverDemoView)
afx_msg void OnHelptopic();
afx_msg void OnPaint();
afx_msg void OnMainCurver();
afx_msg void OnMsgSel();
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in CurverDemoView.cpp
inline CCurverDemoDoc* CCurverDemoView::GetDocument()
{ return (CCurverDemoDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CURVERDEMOVIEW_H__7FFE574C_4883_4BB3_B5BB_C5AA893916A8__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -