📄 gridcell.cpp
字号:
// GridCell.cpp: implementation of the CGridCell class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Prog.h"
#include "GridCell.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
IMPLEMENT_SERIAL(CGridCell, CObject, 0)
CGridCell::CGridCell()
{
m_nCtrlType=JnCtrlText; //默认单元格是文本形式的
m_nState=GVIS_READONLY;
m_nData=0;
m_TopLeftCellId.col=0; //隐藏该单元格的左上角的单元格
m_TopLeftCellId.row=0;
m_nVhide=0; //垂直方向隐藏数量
m_nHhide=0; //水平方向隐藏数量
m_bHide=FALSE; //是否隐藏
m_bSkipH=FALSE; //水平方向是否跳过
m_bSkipV=FALSE; //垂直方向是否跳过
m_bLeft=FALSE;
m_bTop=FALSE;
m_bRight=FALSE;
m_bBottom=FALSE;
m_bEnable=TRUE;
}
CGridCell::~CGridCell()
{
}
void CGridCell::Serialize(CArchive& ar)
{
CObject::Serialize(ar);
UINT n;
if (ar.IsStoring())
{
ar << m_nData;
n=m_nCtrlType;
ar << n;
ar << m_nVhide;
ar << m_nHhide;
ar << m_bHide;
ar << m_bSkipH;
ar << m_bSkipV;
ar << m_bLeft;
ar << m_bTop;
ar << m_bRight;
ar << m_bBottom;
ar << m_TopLeftCellId.col;
ar << m_TopLeftCellId.row;
ar << m_bEnable;
}
else
{
ar >> m_nData;
ar >> n;
m_nCtrlType=(GridCtrlTypeEnum)n;
ar >> m_nVhide;
ar >> m_nHhide;
ar >> m_bHide;
ar >> m_bSkipH;
ar >> m_bSkipV;
ar >> m_bLeft;
ar >> m_bTop;
ar >> m_bRight;
ar >> m_bBottom;
ar >> m_TopLeftCellId.col;
ar >> m_TopLeftCellId.row;
ar >> m_bEnable;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -