Machine Interface Utility:VER1.0
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef UNICODE
|
||||
#define COPYSTRING wcscpy_s
|
||||
#else
|
||||
#define COPYSTRING strcpy_s
|
||||
#endif
|
||||
|
||||
#define STR_CLASS_NAME _T("CDrawGraph")
|
||||
|
||||
typedef CArray<double> DataBuff;
|
||||
// CDrawGraph
|
||||
|
||||
class CDrawGraph : public CWnd
|
||||
{
|
||||
DECLARE_DYNAMIC(CDrawGraph)
|
||||
|
||||
CFont m_fontView;
|
||||
COLORREF m_clrCoordBkg,m_clrFrame,m_clrWave;
|
||||
int m_nMarginLeft,m_nMarginTop,m_nMarginRight,m_nMarginBottom;
|
||||
double m_dbStartX, m_dbEndX,m_dbStartY,m_dbEndY;
|
||||
double m_dbResolutionX,m_dbResolutionY;
|
||||
int m_nDivisionX,m_nDivisionY;
|
||||
DataBuff m_dataGraph;
|
||||
|
||||
public:
|
||||
CDrawGraph();
|
||||
virtual ~CDrawGraph();
|
||||
|
||||
void RegisterCtrlClass();
|
||||
void SetViewFont(const CString& strFont, int nPointSize, int nWeight, BOOL bIsRedraw=TRUE);
|
||||
void SetMargin(int nLeft, int nTop, int nRight, int nBottom, BOOL bIsRedraw=TRUE);
|
||||
bool SetGraphyView(double dbStartX, double dbEndX, double dbStartY, double dbEndY, int nDivisionX = 10, int nDivisionY = 10, BOOL bIsRedraw=TRUE);
|
||||
void SetResolution(double dbResolutionX, double dbResolutionY, BOOL bIsRedraw=TRUE);
|
||||
void LoadGraphyData(DataBuff& dataShow);
|
||||
void AddGraphyData(double _data);
|
||||
void RemoveGraphyData(BOOL bIsRedraw=TRUE);
|
||||
void DrawCoordinate(CDC* pDC, CRect rectCoord);
|
||||
void DrawIdealCurve(CDC* pDC, CRect rectCoord);
|
||||
void DrawActualCurve(CDC* pDC, CRect rectCoord);
|
||||
|
||||
protected:
|
||||
virtual void PreSubclassWindow();
|
||||
|
||||
public:
|
||||
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
|
||||
afx_msg void OnPaint();
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
Reference in New Issue
Block a user