资源简介
采用VC6.0开发,具备设备串口通讯、数据采集及数据库存储等功能
代码片段和文件信息
// ComboGridCtrl.cpp: implementation of the CComboGridCtrl class.
//
// This is a demo of how to override CGridCtrl in order to offer
// other editing capabilities such as a drop down list
//
//////////////////////////////////////////////////////////////////////
#include “stdafx.h“
#include “ComboGridCtrl.h“
#include “InPlaceList.h“
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
BEGIN_MESSAGE_MAP(CComboGridCtrl CGridCtrl)
//{{AFX_MSG_MAP(CComboGridCtrl)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CComboGridCtrl::CComboGridCtrl()
{
m_comboBoxstyle=CBS_DROPDOWN;
}
CComboGridCtrl::~CComboGridCtrl()
{
for(int i=0;i delete m_comStrArray.GetAt(i).comStr;
}
//////////////////////////////////////////////////////////////////////
// Overrides modified by huangjianxiong at 2003-5-17
//////////////////////////////////////////////////////////////////////
void CComboGridCtrl::CreateInPlaceEditControl(CRect& rect DWORD dwstyle UINT nID
int nRow int nCol
LPCTSTR szText int nChar)
{
BOOL bComboCol=FALSE;
COMBOCOL combocol;
for(int i=0;i {
combocol=m_comStrArray.GetAt(i);
if(combocol.iCol==nCol)
{
bComboCol=TRUE;
break;
}
}
// InPlaceList and auto-deletes itself
if(bComboCol)
new CInPlaceList(this rect
//CBS_DROPDOWNLIST // Uncomment for dropdown list style
m_comboBoxstyle // Uncomment for dropdown style
//CBS_SIMPLE // Uncomment for simple style
nID // ID of control being created
nRow nCol
*combocol.comStr szText nChar);
else
CGridCtrl::CreateInPlaceEditControl(rectdwstylenIDnRownColszTextnChar);
}
//****************************************************************
// function:make a specified column can be edit by combo select
// param: 1 int iCol[in]: specify the column
// 2 CArrayString & comStr[in]:string list
// return: BOOL bSuccess
// remark: huangjianxiong modify at 2003-5-17
//*****************************************************************
BOOL CComboGridCtrl::AddComboColumn(int iCol CStringArray &comStr)
{
if(iCol COMBOCOL col;
col.iCol=iCol;
col.comStr=new CStringArray;
col.comStr->Copy(comStr);
m_comStrArray.Add(col);
return TRUE;
}
BOOL CComboGridCtrl::SetItemText(int nRow int nCol LPCTSTR str)
{
int comIndex=IsColumnCombo(nCol);
if(comIndex!=-1&&nRow>=GetFixedRowCount())
{
BOOL bRet;
COMBOCOL combocol=m_comStrArray.
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3686 1998-11-29 18:25 TempMeas原代码\CellRange.h
文件 5441 2003-05-17 21:41 TempMeas原代码\ComboGridCtrl.cpp
文件 1318 2003-05-17 21:36 TempMeas原代码\ComboGridCtrl.h
文件 171855 2008-10-16 21:48 TempMeas原代码\GridCtrl.cpp
文件 26808 2008-10-16 21:47 TempMeas原代码\GridCtrl.h
文件 3626 1999-04-05 11:05 TempMeas原代码\GridDropTarget.cpp
文件 1858 1998-08-06 22:33 TempMeas原代码\GridDropTarget.h
文件 8071 1999-04-11 08:40 TempMeas原代码\InPlaceEdit.cpp
文件 2959 1999-04-11 08:37 TempMeas原代码\InPlaceEdit.h
文件 8886 1998-11-29 08:43 TempMeas原代码\InPlaceList.cpp
文件 3916 1998-08-06 20:28 TempMeas原代码\InPlaceList.h
文件 3206 1999-04-05 12:25 TempMeas原代码\MemDC.h
文件 3615 2009-09-27 13:56 TempMeas原代码\ReadMe.txt
文件 210 2009-09-27 13:56 TempMeas原代码\StdAfx.cpp
文件 3677 2009-09-29 14:34 TempMeas原代码\TempMeas.clw
文件 2091 2009-09-27 13:56 TempMeas原代码\TempMeas.cpp
文件 541 2009-09-27 13:56 TempMeas原代码\TempMeas.dsw
文件 1346 2009-09-27 13:56 TempMeas原代码\TempMeas.h
文件 238592 2009-09-29 14:34 TempMeas原代码\TempMeas.ncb
文件 3222 2009-09-29 14:32 TempMeas原代码\TempMeas.plg
文件 6798 1999-04-18 08:51 TempMeas原代码\ti
文件 1513 1999-04-10 18:15 TempMeas原代码\ti
文件 274511 2009-09-29 12:31 TempMeas原代码\Debug\TempMeas.exe
目录 0 2009-09-28 21:23 TempMeas原代码\Debug
文件 1078 2009-09-27 13:56 TempMeas原代码\res\TempMeas.ico
文件 400 2009-09-27 13:56 TempMeas原代码\res\TempMeas.rc2
目录 0 2009-09-28 21:23 TempMeas原代码\res
文件 19287 2004-02-20 09:12 TempMeas原代码\SerialPortInclude\SerialPort.cpp
文件 2747 2004-02-20 00:31 TempMeas原代码\SerialPortInclude\SerialPort.h
目录 0 2009-09-28 21:23 TempMeas原代码\SerialPortInclude
............此处省略17个文件信息
- 上一篇:城市最短路径查询C语言
- 下一篇:AES详细源码C语言实现带注释
评论
共有 条评论