📄 gridcell.h
字号:
// 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_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -