資源簡介
這個是我從其他網站找了好久才找到的模擬電表的電能表軟件,它支持自動與終端通信的功能,用的是07規約,希望對大家有幫助。
代碼片段和文件信息
//?AIGrid.cpp:?implementation?of?the?CAIGrid?class.
//
//////////////////////////////////////////////////////////////////////
#include?“stdafx.h“
#include?“GridCtrl.h“
#include?“InPlaceList.h“
#include?“InPlaceEdit.h“
#include?“AIGrid.h“
#ifdef?_DEBUG
#undef?THIS_FILE
static?char?THIS_FILE[]=__FILE__;
#define?new?DEBUG_NEW
#endif
BEGIN_MESSAGE_MAP(CAIGrid?CGridCtrl)
????//{{AFX_MSG_MAP(CComboGridCtrl)
????//}}AFX_MSG_MAP
????ON_NOTIFY(NM_ENDLABELEDIT?IDC_IPEDIT?OnEndInPlaceEditList)
????ON_NOTIFY(NM_ENDLABELLIST?IDC_IPLIST?OnEndInPlaceEditList)
//ON_MESSAGE(NM_NEEDROWCOLOnNeedRowCol)
END_MESSAGE_MAP()
//////////////////////////////////////////////////////////////////////
//?Construction/Destruction
//////////////////////////////////////////////////////////////////////
CAIGrid::~CAIGrid()
{
}
CAIGrid::CAIGrid(int?nRows?int?nCols?int?nFixedRows?int?nFixedCols)
:CGridCtrl(nRows?nCols?nFixedRows?nFixedCols)
{
// CGridCtrl::CGridCtrl(nRows?nCols?nFixedRows?nFixedCols);
}
int?CAIGrid::GetRowCount()?const?
{
return?CGridCtrl::GetRowCount();
}
int?CAIGrid::GetRow()?const
{
return?GetFocusCell().row;
}
int?CAIGrid::GetCol()?const
{
return?GetFocusCell().col;
}
int?CAIGrid::GetColumnCount()?const
{
return?CGridCtrl::GetColumnCount();
}
int?CAIGrid::GetFixedRowCount()?const?
{
return?CGridCtrl::GetFixedRowCount();
}
int?CAIGrid::GetFixedColumnCount()?const?
{
return?CGridCtrl::GetFixedColumnCount();
}
BOOL?CAIGrid::SetRowCount(int?nRows)
{
return?CGridCtrl::SetRowCount(nRows);
}
BOOL?CAIGrid::SetColumnCount(int?nCols)
{
return?CGridCtrl::SetColumnCount(nCols);
}
BOOL?CAIGrid::SetFixedRowCount(int?nFixedRows)
{
return?CGridCtrl::SetFixedRowCount(nFixedRows);
}
BOOL?CAIGrid::SetFixedColumnCount(int?nFixedCols)
{
return?CGridCtrl::SetFixedColumnCount(nFixedCols);
}
int??CAIGrid::GetRowHeight(int?nRow)?const
{
return?CGridCtrl::GetRowHeight(nRow);
}
BOOL?CAIGrid::SetRowHeight(int?row?int?height)
{
return?CGridCtrl::SetRowHeight(row?height);
}
int??CAIGrid::GetColumnWidth(int?nCol)?const
{
return?CGridCtrl::GetColumnWidth(nCol);
}
BOOL?CAIGrid::SetColumnWidth(int?col?int?width)
{
return?CGridCtrl::SetColumnWidth(col?width);
}
int??CAIGrid::GetItemState(int?nRowint?nCol)?const
{
return?CGridCtrl::GetItemState(nRow?nCol);
}
BOOL?CAIGrid::SetItemState(int?nRowint?nCol?int?nType)
{
int?nStatenMask;
BOOL?bRet=TRUE;
nMask?=?0x0FF0F;
nState?=?CGridCtrl::GetItemState(nRownCol);
nState?=?(?nState?&?nMask?)?|?nType;
return?CGridCtrl::SetItemState(nRownColnState);
}
BOOL?CAIGrid::SetColumnType(int?nCol?int?nType)
{
int?nRows?=?CGridCtrl::GetRowCount();
int?nStatenMask;
BOOL?bRet=TRUE;
nMask?=?0x0FF0F;
for(int?nRow=0?;?nRow nState?=?CGridCtrl::GetItemState(nRownCol);
// if?(?GVIS_EDIT?==?nType?)???????{
//if?user?sets?to?editablethen?g
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????????0??2010-08-26?10:59??模擬電表\--.-pipe-com_1-2010August26105904--B2C-538
?????文件??????????0??2010-08-26?11:12??模擬電表\--.-pipe-com_1-2010August26111221--B2C-538
?????文件??????????0??2010-08-26?11:12??模擬電表\--.-pipe-com_1-2010August26111258--B2C-538
?????文件??????????0??2010-08-26?11:13??模擬電表\--.-pipe-com_1-2010August26111312--2B8-1D8
?????文件??????????0??2010-08-26?11:13??模擬電表\--.-pipe-com_1-2010August26111327--860-CF4
?????文件??????????0??2010-08-30?10:55??模擬電表\--.-pipe-com_1-2010August30105522--A38-ACC
?????文件??????????0??2010-08-30?10:56??模擬電表\--.-pipe-com_1-2010August30105634--A38-ACC
?????文件??????????0??2010-08-30?10:57??模擬電表\--.-pipe-com_1-2010August30105719--A38-ACC
?????文件??????????0??2010-08-30?10:59??模擬電表\--.-pipe-com_1-2010August30105917--A38-ACC
?????文件??????????0??2010-08-30?11:00??模擬電表\--.-pipe-com_1-2010August30110023--A38-ACC
?????文件??????????0??2010-08-30?13:36??模擬電表\--.-pipe-com_1-2010August30133646--A38-ACC
?????文件??????????5??2010-08-31?10:20??模擬電表\--.-pipe-com_1-2010August31095001--EB8-E4C
?????文件??????????5??2010-08-31?14:49??模擬電表\--.-pipe-com_1-2010August31141901--878-7C4
?????文件??????????0??2010-09-03?09:19??模擬電表\--.-pipe-com_1-2010September03091917--D64-A00
?????文件??????????0??2010-09-03?09:30??模擬電表\--.-pipe-com_1-2010September03093046--4A0-BCC
?????文件??????????0??2010-09-03?10:55??模擬電表\--.-pipe-com_1-2010September03105531--2F8-1C8
?????文件??????????0??2010-09-03?11:07??模擬電表\--.-pipe-com_1-2010September03110705--AE0-B44
?????文件??????????0??2010-09-03?11:07??模擬電表\--.-pipe-com_1-2010September03110733--AE0-B44
?????文件??????????0??2010-09-06?15:09??模擬電表\--.-pipe-com_1-2010September06150934--524-4C8
?????文件??????????0??2010-09-06?15:11??模擬電表\--.-pipe-com_1-2010September06151106--AF0-B10
?????文件??????????0??2010-09-06?15:25??模擬電表\--.-pipe-com_1-2010September06152529--E28-CA8
?????文件??????15424??2010-08-23?14:21??模擬電表\AIGrid.cpp
?????文件???????5581??2010-08-23?14:21??模擬電表\AIGrid.h
?????文件???????8072??2010-08-23?14:21??模擬電表\BianliangDlg.cpp
?????文件???????1850??2010-08-23?14:21??模擬電表\BianliangDlg.h
?????文件???????3598??2010-08-23?14:21??模擬電表\CellRange.h
?????文件???????4983??2010-08-23?14:21??模擬電表\CommDlg.cpp
?????文件???????1445??2010-08-23?14:21??模擬電表\CommDlg.h
?????文件????????178??2010-08-23?14:21??模擬電表\com_645_magic.h
?????文件???????7587??2010-08-23?14:21??模擬電表\datatxt.cpp
............此處省略128個文件信息
評論
共有 條評論