www.pudn.com > realtime.rar > RTDemoView.h, change:2003-12-19,size:3336b

// RTDemoView.h : interface of the CRTDemoView class 
#if !defined(AFX_RTDemoVIEW_H__12551283_E7E7_11D3_85BC_0008C777FFEE__INCLUDED_) 
#define AFX_RTDemoVIEW_H__12551283_E7E7_11D3_85BC_0008C777FFEE__INCLUDED_ 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
#include "RealTime.h" 
#include "RTSlider.h" 
#include "random.h" 
class CRTDemoView : public CView 
	// just want to save time using temporary variables 
	int    i, m, n; 
	double m_dY, m_dValue; 
protected: // create from serialization only 
// Attributes 
	CRTDemoDoc* GetDocument(); 
	CRealTime  m_Graph; 
	RndGen Rn; 
	DWORD  m_nStartTime; 
	int	   m_nTimeSpan; 
	DWORD  MaxSeconds; 
	DWORD  mSec; 
	double CyclesPerSec; 
	DWORD  CurrentTime; 
	BOOL   m_bCanSize; 
	CRTSlider m_SliderTick; 
	CRect	  m_SRect; 
	int		  m_sSize; 
	int		  m_sTicks; 
	BOOL	  m_bFlag; 
	BOOL	  CanTicks; 
	DWORD	  m_nTicks; 
	BOOL	  m_bRealTime; 
	BOOL	  m_bTimerOn; 
// Operations 
	void DrawFrame(CRect& rect, COLORREF cr, const char* Title); 
	void Redraw(); 
	void SetData(int i); 
	void RefreshGraph(); 
	RECT& GetGraphRect(); 
	CWnd* GetRTForm(); 
	void  ResetSlider(int Ticks); 
	void  GetYValues(int Index); 
	void  TicksRanges(); 
	void  RTKillTimer(); 
	void  RTRestoreTimer(); 
	void  RemoveALine(int Index); 
	BOOL  InsertALine(int index, COLORREF color, double low, double high,  
					  const char* name, const char* desc, const char* unit,  
					  double min, double max, int style, int width); 
	void  SaveAModifiedLine(); 
	void  GetColorAndName(int index, COLORREF& cr, CString& name); 
// Overrides 
	// ClassWizard generated virtual function overrides 
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view 
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 
	virtual void OnInitialUpdate(); 
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); 
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); 
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); 
// Implementation 
	SYSTEMTIME lpSystemTime; 
	virtual ~CRTDemoView(); 
#ifdef _DEBUG 
	virtual void AssertValid() const; 
	virtual void Dump(CDumpContext& dc) const; 
	CString m_sString; 
	DWORD   MillSeconds; 
	int		SpeedLevel; 
// Generated message map functions 
	afx_msg void OnContextMenu(CWnd*, CPoint point); 
	afx_msg BOOL OnEraseBkgnd(CDC* pDC); 
	afx_msg void OnTimer(UINT nIDEvent); 
	afx_msg void OnDestroy(); 
	afx_msg void OnSize(UINT nType, int cx, int cy); 
	afx_msg void OnSpeedTimerspeed(); 
	afx_msg void OnUpdateSpeedTimerspeed(CCmdUI* pCmdUI); 
#ifndef _DEBUG  // debug version in RTDemoView.cpp 
inline CRTDemoDoc* CRTDemoView::GetDocument() 
   { return (CRTDemoDoc*)m_pDocument; } 
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 
#endif // !defined(AFX_RTDemoVIEW_H__12551283_E7E7_11D3_85BC_0008C777FFEE__INCLUDED_)