REPORTVIEW.H
上传用户:lvjun8202
上传日期:2013-04-30
资源大小:797k
文件大小:3k
- #if !defined(AFX_REPORTVIEW_H__685FF982_FBF3_11D1_9548_000021DD79E8__INCLUDED_)
- #define AFX_REPORTVIEW_H__685FF982_FBF3_11D1_9548_000021DD79E8__INCLUDED_
- #if _MSC_VER >= 1000
- #pragma once
- #endif // _MSC_VER >= 1000
- // ReportView.h : header file
- //
- #define MAXCLIENTTYPE 8
- #define MAXACLIENTNUM 8
- #define MAXSMNUM 64
- #define MAXNO7NUM 2
- #define MAXVLRNUM 1
- #define MAXROW 200
- #define MAXCOL 80
- #define TABSTOP 8
- // ASCII characters that receive special processing
- #define ASCII_BEL 0x07
- #define ASCII_BS 0x08
- #define ASCII_TAB 0x09
- #define ASCII_LF 0x0A
- #define ASCII_CR 0x0D
- #define ASCII_XON 0x11
- #define ASCII_XOFF 0x13
- #define HJD04PORT 6000
- ////////////////////////////////////////////////////////////////////////////
- // CReportView view
- class COAMDoc;
- struct StructOfString
- {
- int m_Type;
- BYTE m_pString[MAXCOL];
- };
- typedef struct StructOfString ReprtString;
- class ReprtWndData
- {
- public:
- ReprtWndData()
- {
- // m_pReportView = NULL;
- InitData();
- }
- void InitData()
- {
- memset(m_pReportString, ' ', MAXROW * sizeof(ReprtString));
- m_nRow = 0;
- m_nColumn = 0;
- m_nTopRow = 0;
- m_nScrolled = 0;
- m_bScrolled = FALSE;
- }
- ~ReprtWndData() {}
- // CReportView * m_pReportView;
- ReprtString m_pReportString[MAXROW];
- int m_nRow;
- int m_nColumn;
- int m_nTopRow;
- int m_nScrolled;
- BOOL m_bScrolled;
- };
- class CReportView : public CScrollView
- {
- protected:
- DECLARE_DYNCREATE(CReportView)
- // Attributes
- public:
- CReportView(); // protected constructor used by dynamic creation
- virtual ~CReportView();
- BOOL m_nHasAlert;
- CString m_strName;
- int m_nSplashCnt;
- int m_nChildID;
- ReprtWndData m_OperationReportData;
- CSize m_charSize;
- LOGFONT m_lfFont;
- COLORREF m_crText;
- COLORREF m_crStrictText;
- // Operations
- public:
- BOOL WriteReportLine(LPSTR lpBlock,int Type=0,BOOL bShowTime = TRUE);
- BOOL WriteReportBlock(LPSTR lpBlock, int nLength,int Type=0);
- BOOL WriteReportLine(LPCSTR lpBlock,int Type=0,BOOL bShowTime = TRUE);
-
- void SetType(int type);
- void SetFont(LOGFONT *lf);
- void SetSizes();
- void MoveCursor(BOOL bScroll = FALSE);
- COAMDoc* GetDocument();
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CReportView)
- protected:
- virtual void OnDraw(CDC* pDC); // overridden to draw this view
- virtual void OnInitialUpdate(); // first time after construct
- //}}AFX_VIRTUAL
- // Implementation
- protected:
- int m_nType;
- CFont * m_pFont;
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- // Generated message map functions
- //{{AFX_MSG(CReportView)
- afx_msg void OnSize(UINT nType, int cx, int cy);
- afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
- afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- #ifndef _DEBUG // debug version in OAMServerView.cpp
- inline COAMDoc* CReportView::GetDocument()
- { return (COAMDoc*)m_pDocument; }
- #endif
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_REPORTVIEW_H__685FF982_FBF3_11D1_9548_000021DD79E8__INCLUDED_)