?? fibertestclientview.h
字號:
// FiberTestClientView.h : interface of the CFiberTestClientView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_FIBERTESTCLIENTVIEW_H__6E85D9FA_3BBA_490B_8233_69C831161DAA__INCLUDED_)
#define AFX_FIBERTESTCLIENTVIEW_H__6E85D9FA_3BBA_490B_8233_69C831161DAA__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define TIME_DRAW 100 //采樣周期(單位:毫秒,可根據(jù)需要定制)
#define ID_TIMER_DRAW_POINT 1 //畫點A,B,C的定時器編號
#define ID_TIMER_READ_POINT 2 //采樣,記錄數(shù)據(jù)庫的定時器編號
#define TIME_BASE 100 //周期基準(單位:毫秒,用于計算,勿改動)
#define POINT_NULL 255 //不可能的點值,無效值
#define POINT_COUNT (30000/TIME_DRAW) //30秒內(nèi)采樣點的個數(shù)
//如果直接從數(shù)據(jù)庫讀取數(shù)據(jù)顯示,需注釋下一行,取消 “INPUT_DATA”的定義
//如果從串口讀取數(shù)據(jù)顯示的,需要下行定義(#define INPUT_DATA),且必須要把從串口讀到的數(shù)據(jù)即時放入暫存(需完善 080412_ReadData 部分?)
#define INPUT_DATA //如果直接從串口讀取數(shù)據(jù)顯示并儲存;
class CFiberTestClientView : public CFormView
{
protected: // create from serialization only
CFiberTestClientView();
DECLARE_DYNCREATE(CFiberTestClientView)
CFiberTestClientDoc* GetDocument();
public:
//{{AFX_DATA(CFiberTestClientView)
enum { IDD = IDD_FIBERTESTCLIENT_FORM };
int m_xtime1;
int m_ymax;
int m_ymin;
CString m_Coord;
CString m_datatime;
//}}AFX_DATA
// Attributes
public:
int m_left,m_top,m_right,m_bottom;
int m_IntervalPan;
int m_Interval;
int m_xtime;
int m_iPointCount; //采樣點的數(shù)量
bool m_bIsSetDrawPoint; //畫數(shù)據(jù)線定時器已設(shè)定標志;
bool m_bIsSetReadPoint; //讀暫存數(shù)據(jù)定時器設(shè)定標志
bool m_bIsFinishDraw; //已繪采樣點數(shù)量
bool m_bIsReTest;
UINT *m_uPointA; //A點的數(shù)據(jù)
UINT *m_uPointB; //B....
UINT *m_uPointC; //C....
UINT *m_uDrawedPointA;//已畫過的A點的數(shù)據(jù);
UINT *m_uDrawedPointB;//........B.......
UINT *m_uDrawedPointC;//........C.......
static UINT m_uTempPointA; //A點的數(shù)據(jù)暫存
static UINT m_uTempPointB; //B.......
static UINT m_uTempPointC; //C.......
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CFiberTestClientView)
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual void OnInitialUpdate(); // called first time after construct
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
void InitData();
void DrawWave(CDC *pDC);
void DrawPoint();//畫數(shù)據(jù)曲線
virtual ~CFiberTestClientView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
private:
CDC *pDC; //屏幕繪圖設(shè)備
CDC memDC; //內(nèi)存繪圖設(shè)備
int m_High; //繪圖起點
int m_Low; //繪圖終點
// Generated message map functions
protected:
void Read();
CString GetTime();
LRESULT OnComm(WPARAM wParam, LPARAM lParam);
void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
//{{AFX_MSG(CFiberTestClientView)
afx_msg void OnChangeYmin();
afx_msg void OnChangeYmax();
afx_msg void OnPaint();
afx_msg void OnChangeTestTime();
afx_msg void OnTimer(UINT nIDEvent);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in FiberTestClientView.cpp
inline CFiberTestClientDoc* CFiberTestClientView::GetDocument()
{ return (CFiberTestClientDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_FIBERTESTCLIENTVIEW_H__6E85D9FA_3BBA_490B_8233_69C831161DAA__INCLUDED_)
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -