#if !defined(AFX_PlotCanvas_H__INCLUDED_) #define AFX_PlotCanvas_H__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // PlotCanvas.h : header file #define CC_SYSCOLOR(ind) (0x80000000|((ind) & ~CLR_DEFAULT)) #define ctrlColBlue RGB(0x00,0x00,0xFF) #define ctrlColSkyBlue RGB(0x32,0x99,0xCC) #define ctrlColLightBlue RGB(0xC0,0xD9,0xD9) #define ctrlColLightCyan RGB(0xE0,0xFF,0xFF) #define ctrlColYellow RGB(0x00,0xFF,0xFF) #define ctrlColGreen RGB(0x00,0xFF,0x00) #define ctrlDarkGreen RGB(0x2F,0x4F,0x2F) #define ctrlDarkGreenCopper RGB(0x4A,0x76,0x6E) #define ctrlDarkOliveGreen RGB(0x4F,0x4F,0x2F) #define ctrlColRed RGB(0xFF,0x00,0x00) #define ctrlColBlack RGB(0x00,0x00,0x00) #define ctrlColWhite RGB(0xFF,0xFF,0xFF) #define ctrlColDefault CLR_DEFAULT //#define ctrlColWinBk CC_SYSCOLOR(COLOR_WINDOW) #define ctrlColWinBk GetSysColor(0x80000005L) #define ctrlColWinText CC_SYSCOLOR(COLOR_WINDOWTEXT) #define ctrlColBtnFace CC_SYSCOLOR(COLOR_BTNFACE) #define ctrlColInfoBk CC_SYSCOLOR(COLOR_INFOBK) #define ctrlColInfoText CC_SYSCOLOR(COLOR_INFOTEXT) #define ctrlColJavaGray RGB(0x64,0x64,0x64) #define ctrlColLightGray RGB(0xA8,0xA8,0xA8) #define ctrlColGray RGB(0xC0,0xC0,0xC0) typedef struct _COORD_LONG { // coord. long X; // horizontal coordinate long Y; // vertical coordinate } COORD_LONG; ///////////////////////////////////////////////////////////////////////////// // CPlotCanvas window class CPlotCanvas : public CStatic { // Construction public: CPlotCanvas(); // Attributes public: COLORREF m_crDisplayBGColor; COLORREF m_crPlotColor; COLORREF m_crCursorColor; COLORREF m_crTextFGColor; COLORREF m_crTextBGColor; //COLORREF m_crGridColor; bool hasBackground; bool PersistenceMode; int CursorPosition; int OldCursorPosition; COORD_LONG PlotCursor; COORD_LONG OldPlotCursor; long YPlotBuffer[8192]; //holds y position data for cursor updates long YPlotMAX; long XPlotMAX; bool OptScaleType; bool OptPlotType; // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CPlotCanvas) //}}AFX_VIRTUAL // Implementation public: void Invalidate(); void PlotTrace(long YPlotBufferIn[8192]); virtual ~CPlotCanvas(); // Generated message map functions protected: //{{AFX_MSG(CPlotCanvas) afx_msg BOOL OnEraseBkgnd(CDC* pDC); afx_msg void OnPaint(); //}}AFX_MSG DECLARE_MESSAGE_MAP() private: void DrawPlotCanvas(CRect *pRect, CDC *pDCa = NULL); public: //void MakePlot(long YPlotBufferIn[8192]); void ClearTrace(); void OnRefreshBkgnd(); void SetPersistenceMode(bool Persistence); void SetCursorPosition(int CursorPos); void DrawCursor(CDC *dcMem, long YPlotBufferIn[8192], bool EraseCursor); afx_msg void OnLButtonDown(UINT nFlags, CPoint point); void DataAcq(long DataBuffer[8192], int NumChan); }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_PlotCanvas_H__INCLUDED_)