📄 datavsame.h
字号:
/*****************************************************************************
COPYRIGHT (C) 2000, Ken Bertelson <kenbertelson@hotmail.com>
*****************************************************************************/
#if !defined(AFX_DATAVSAME_H__51055662_F9EE_11D3_B765_00C04F6A7AE6__INCLUDED_)
#define AFX_DATAVSAME_H__51055662_F9EE_11D3_B765_00C04F6A7AE6__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "GridCell.h"
class _GTC_EXT_CLASS CDataVSame
{
public:
CDataVSame();
virtual ~CDataVSame();
void SetParentWnd( CWnd* pWnd )
{ m_pWnd = pWnd; }
// Attributes
public:
virtual void SetFormat(int nRow, int nCol, DWORD nFormat);
virtual void SetImage(int /* nRow */, int /* nCol */, int nImage) { m_nImage = nImage; }
virtual void SetData(int /* nRow */, int /* nCol */, LPARAM lParam) { m_lParam = lParam; }
virtual void SetTextClr(int /* nRow */, int /* nCol */, COLORREF clr) { m_crFgClr = clr; }
virtual void SetBackClr(int /* nRow */, int /* nCol */, COLORREF clr) { m_crBkClr = clr; }
virtual void SetFont(int /* nRow */, int /* nCol */, const LOGFONT* plf){ memcpy(&(m_lfFont), plf, sizeof(LOGFONT)); }
virtual void SetMargin(int /* nRow */, int /* nCol */, UINT nMargin) { m_nMargin = nMargin; }
virtual void SetGrid(CWnd* /* pGrid */) { ASSERT(m_pWnd); }
virtual LPCTSTR GetText(int nRow, int nCol);
virtual int GetImage(int /* nRow */, int /* nCol */) { return m_nImage; }
virtual LPARAM GetData(int /* nRow */, int /* nCol */) { return m_lParam; }
virtual DWORD GetFormat(int nRow, int nCol)
{
if( nRow == 0)
return m_nFormatRowZero;
else if( nCol == 0)
return m_nFormatColZero;
return m_nFormat;
}
virtual COLORREF GetTextClr(int /* nRow */, int /* nCol */) { return m_crFgClr; }
virtual COLORREF GetBackClr(int /* nRow */, int /* nCol */) { return m_crBkClr; }
virtual const LOGFONT* GetFont(int /* nRow */, int /* nCol */) { return &m_lfFont; }
virtual UINT GetMargin(int /* nRow */, int /* nCol */) { return m_nMargin; }
virtual CGridCtrl* GetGrid() { return (CGridCtrl*)m_pWnd; }
protected:
DWORD m_nFormat; // Cell format
DWORD m_nFormatColZero; // for row and column headings
DWORD m_nFormatRowZero;
int m_nImage;
LPARAM m_lParam;
COLORREF m_crBkClr; // Background colour (or CLR_DEFAULT)
COLORREF m_crFgClr; // Forground colour (or CLR_DEFAULT)
LOGFONT m_lfFont; // Cell font
UINT m_nMargin; // Internal cell margin
CWnd* m_pWnd; // key to virtual grid text info
};
#endif // !defined(AFX_DATAVSAME_H__51055662_F9EE_11D3_B765_00C04F6A7AE6__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -