GridCell.h
资源名称:MyStock.rar [点击查看]
上传用户:wenjimin
上传日期:2014-08-12
资源大小:111k
文件大小:2k
源码类别:
金融证券系统
开发平台:
Visual C++
- // GridCell.h: interface for the CGridCell class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_GRIDCELL_H__768A7056_3D28_11D8_B617_A69FB0BE0671__INCLUDED_)
- #define AFX_GRIDCELL_H__768A7056_3D28_11D8_B617_A69FB0BE0671__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "GridCellBase.h"
- class CGridCell : public CGridCellBase
- {
- DECLARE_DYNCREATE(CGridCell)
- public:
- CGridCell();
- virtual ~CGridCell();
- // Attributes
- public:
- void operator=(const CGridCell& cell);
- virtual void SetText(LPCTSTR szText) { m_strText = szText; }
- virtual void SetGrid(CGridCtrl* pGrid) { m_pGrid = pGrid; }
- virtual void SetTextClr(COLORREF clr) { m_crFgClr = clr; }
- virtual void SetBackClr(COLORREF clr) { m_crBkClr = clr; }
- virtual void SetFont(const LOGFONT* plf);
- virtual LPCTSTR GetText() const { return (m_strText.IsEmpty())? _T("") : LPCTSTR(m_strText); }
- virtual CGridCtrl* GetGrid() const { return m_pGrid; }
- virtual COLORREF GetTextClr() const { return m_crFgClr; } // TODO: change to use default cell
- virtual COLORREF GetBackClr() const { return m_crBkClr; }
- virtual LOGFONT* GetFont() const;
- virtual CFont* GetFontObject() const;
- virtual BOOL IsDefaultFont() const { return (m_plfFont == NULL); }
- protected:
- CString m_strText; // Cell text (or binary data if you wish...)
- COLORREF m_crFgClr;
- COLORREF m_crBkClr;
- LOGFONT* m_plfFont;
- CGridCtrl* m_pGrid; // Parent grid control
- };
- #endif // !defined(AFX_GRIDCELL_H__768A7056_3D28_11D8_B617_A69FB0BE0671__INCLUDED_)