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

📄 oscopectrl.h

📁 这是本人帮别人做的万能试验机数据吹系统(部分)
💻 H
字号:
// OScopeCtrl.h : header file
//

#ifndef __OScopeCtrl_H__
#define __OScopeCtrl_H__

#define GRIDMORE 1
#define GRIDMOST 2
#define GRIDDEFAULT 0
#define IMGDEFAULT 0 
#define IMGDEFINE 1
/////////////////////////////////////////////////////////////////////////////
// COScopeCtrl window

class COScopeCtrl : public CWnd
{
// Construction
public:
  COScopeCtrl();

// Attributes
public:
  double AppendPoint(double dNewPointV,double dNewPointH,int nMode);
  void SetRangeV(double dLower, double dUpper, int nDecimalPlaces=1);
  void SetXUnits(CString string);
  void SetYUnits(CString string);
  void SetGridColor(COLORREF color);
  void SetPlotColor(COLORREF color);
  void SetBackgroundColor(COLORREF color);
  void InvalidateCtrl();
  void DrawPoint();
  void Reset();

  // Operations
public:

// Overrides
  // ClassWizard generated virtual function overrides
  //{{AFX_VIRTUAL(COScopeCtrl)
  public:
  virtual BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID=NULL);
  //}}AFX_VIRTUAL

// Implementation
public:
	void SetGridN(int pGrid);
	void SetTopic(CString s);
	
	void CLC();
	double m_dHorizontalFactor;
	int m_nType;
	void SetType(int nType);
	CString m_sXLowr;
	CString m_sXUpper;
	void SetRangeH(double hLower,double hUpper);
	void SetGridType(int nType);
	int m_nGridType;
	int m_nGridN;
    int m_nShiftPixels;          // amount to shift with each new point 
    int m_nYDecimals;

  CString m_strXUnitsString;
  CString m_strYUnitsString;

  COLORREF m_crBackColor;        // background color
  COLORREF m_crGridColor;        // grid color
  COLORREF m_crPlotColor;        // data color  
  
  double m_dCurrentPositionV;   // current  Vertical position
  double m_dPreviousPositionV;  // previous Vertical position

  double m_dCurrentPositionH;   // current Horizontal position
  double m_dPreviousPositionH;  // previous Horizontal position

  virtual ~COScopeCtrl();

  // Generated message map functions
protected:
  //{{AFX_MSG(COScopeCtrl)
  afx_msg void OnPaint();
  afx_msg void OnSize(UINT nType, int cx, int cy); 
  //}}AFX_MSG
  DECLARE_MESSAGE_MAP()

  int m_nHalfShiftPixels;
  int m_nPlotShiftPixels;
  int m_nClientHeight;
  int m_nClientWidth;
  int m_nPlotHeight;
  int m_nRectHeight;
  int m_nRectWidth;
  int m_nPlotWidth;

  double m_dLowerLimitV;        // lower bounds
  double m_dUpperLimitV;        // upper bounds

  double m_dLowerLimitH;        // lower bounds
  double m_dUpperLimitH;        // upper bounds

  double m_dRangeV;
  double m_dRangeH;
  double m_dVerticalFactor;
  
  CRect  m_rectClient;
  CRect  m_rectPlot;
  CPen   m_penPlot;
  CBrush m_brushBack;

  CDC     m_dcGrid;
  CDC     m_dcPlot;
  CBitmap *m_pbitmapOldGrid;
  CBitmap *m_pbitmapOldPlot;
  CBitmap m_bitmapGrid;
  CBitmap m_bitmapPlot;

private:
	CString m_sTopic;
	int m_iCLC;
	int m_iViewBottom;
	int m_iViewLeft;
};

/////////////////////////////////////////////////////////////////////////////
#endif

⌨️ 快捷键说明

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