www.pudn.com > symbian_sms_alarm.rar > MsgDemoView.cpp
// MsgDemoView.cpp : implementation of the CMsgDemoView class
//
#include "stdafx.h"
#include "MsgDemo.h"
#include "MsgDemoDoc.h"
#include "MsgDemoView.h"
#include "resource.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMsgDemoView
IMPLEMENT_DYNCREATE(CMsgDemoView, CView)
BEGIN_MESSAGE_MAP(CMsgDemoView, CView)
ON_WM_CONTEXTMENU()
//{{AFX_MSG_MAP(CMsgDemoView)
ON_WM_SIZE()
ON_COMMAND(ID_REFRESH, OnRefresh)
ON_COMMAND(ID_ADD, OnAdd)
ON_COMMAND(ID_DELETE, OnDelete)
ON_COMMAND(ID_EDIT, OnEdit)
ON_WM_ERASEBKGND()
ON_NOTIFY(NM_DBLCLK, IDC_MSGLIST, OnDblclkMsgList)
ON_COMMAND(ID_SEND_MSG, OnSendMsg)
ON_COMMAND(ID_SEEK, OnSeek)
ON_COMMAND(ID_REMOVE_ALL, OnRemoveAll)
ON_COMMAND(ID_CONFIG_REAL, OnConfigReal)
ON_WM_TIMER()
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMsgDemoView construction/destruction
CMsgDemoView::CMsgDemoView()
{
// TODO: add construction code here
bResetLoad=FALSE;
}
CMsgDemoView::~CMsgDemoView()
{
if(bResetLoad)
{
m_pConnection->Close();
m_pConnection.Release();
}
}
BOOL CMsgDemoView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CMsgDemoView drawing
void CMsgDemoView::OnDraw(CDC* pDC)
{
CMsgDemoDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CMsgDemoView printing
BOOL CMsgDemoView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CMsgDemoView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CMsgDemoView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CMsgDemoView diagnostics
#ifdef _DEBUG
void CMsgDemoView::AssertValid() const
{
CView::AssertValid();
}
void CMsgDemoView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CMsgDemoDoc* CMsgDemoView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMsgDemoDoc)));
return (CMsgDemoDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CMsgDemoView message handlers
void CMsgDemoView::OnInitialUpdate()
{
CView::OnInitialUpdate();
CRect rect;
GetClientRect(&rect);
//如果使用OWNERDRAW属性能够是用彩色LIST,但是没有鼠标移动的选中效果.
m_List.Create(WS_CHILD|WS_VISIBLE| LVS_REPORT/* | LVS_OWNERDRAWFIXED*/,rect,this,IDC_MSGLIST);
this->m_List.DeleteAllItems();
//设置list控件的文字和背景颜色
m_List.SetBkColor(RGB(255,255,255));
m_List.SetTextBkColor(RGB(255,255,255));
//清空list控件的数据
for(int delcolumn=100;delcolumn>=0;delcolumn--)
m_List.DeleteColumn(delcolumn);
//设置list对话框的列
DWORD dwStyle;
LV_COLUMN lvc;
dwStyle = m_List.GetStyle();
dwStyle |= LVS_EX_GRIDLINES |LVS_EX_FULLROWSELECT |LVS_SHOWSELALWAYS |LVS_EDITLABELS ;
m_List.SetExtendedStyle(dwStyle);
lvc.mask = LVCF_TEXT | LVCF_SUBITEM | LVCF_WIDTH |LVCF_FMT;
lvc.fmt=LVCFMT_LEFT;
lvc.iSubItem = 0;
lvc.pszText = _T("列队编号");
lvc.cx = rect.Width()/10;
m_List.InsertColumn(1,&lvc);
lvc.iSubItem = 1;
lvc.pszText = _T("信息内容");
lvc.cx = rect.Width()*3/10;
m_List.InsertColumn(2,&lvc);
lvc.iSubItem = 2;
lvc.pszText = _T("呼叫号码");
lvc.cx = rect.Width()/5;
m_List.InsertColumn(3,&lvc);
lvc.iSubItem = 3;
lvc.pszText = _T("发送级别");
lvc.cx = rect.Width()/10;
m_List.InsertColumn(4,&lvc);
lvc.iSubItem = 4;
lvc.pszText = _T("备注");
lvc.cx = rect.Width()*3/10;
m_List.InsertColumn(5,&lvc);
//添加LISTCTRL内容,同时读取INI内容
theApp.SetDlgSkin();
if(MessageBox("加载短信报警驱动信息,需要重新配置新的驱动文件吗?","提示信息",MB_OKCANCEL|MB_ICONQUESTION)==IDOK)
{
ConnectToDatabase();
bResetLoad=TRUE;
}
ReadIniFileVal();
theApp.SetMainFrmSkin();
m_MsgSend.InitDevice();
SetTimer(1,1000,NULL);
}
void CMsgDemoView::OnSize(UINT nType, int cx, int cy)
{
CView::OnSize(nType, cx, cy);
// TODO: Add your message handler code here
CRect rect;
GetClientRect(&rect);
if(m_List)
{
m_List.MoveWindow(&rect,TRUE);
m_List.SetColumnWidth(0,rect.Width()/10);
m_List.SetColumnWidth(1,rect.Width()*3/10);
m_List.SetColumnWidth(2,rect.Width()/5);
m_List.SetColumnWidth(3,rect.Width()/10);
m_List.SetColumnWidth(4,rect.Width()*3/10);
}
}
void CMsgDemoView::OnContextMenu(CWnd*, CPoint point)
{
CRect rect;
int iOption;
iOption = m_List.GetSelectedCount();
//得到当前选中的行
POSITION pos = m_List.GetFirstSelectedItemPosition();
//如果选中一行
m_List.GetClientRect(&rect);
if(rect.PtInRect(point)&&pos)
// CG: This block was added by the Pop-up Menu component
{
if (point.x == -1 && point.y == -1){
//keystroke invocation
CRect rect;
GetClientRect(rect);
ClientToScreen(rect);
point = rect.TopLeft();
point.Offset(5, 5);
}
CMenu menu;
VERIFY(menu.LoadMenu(IDR_POPMENU));
CMenu* pPopup = menu.GetSubMenu(0);
ASSERT(pPopup != NULL);
CWnd* pWndPopupOwner = this;
while (pWndPopupOwner->GetStyle() & WS_CHILD)
pWndPopupOwner = pWndPopupOwner->GetParent();
// pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y,
// pWndPopupOwner);
TrackSkinPopupMenu( pPopup->m_hMenu, TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y,
pWndPopupOwner->m_hWnd );
}
}
void CMsgDemoView::OnRefresh()
{
// TODO: Add your command handler code here
m_List.UpdateWindow();
Invalidate();
}
void CMsgDemoView::OnAdd()
{
// TODO: Add your command handler code here
CAddMsgDlg dlg;
if(dlg.DoModal()==IDOK)
{
BOOL bExist=FALSE;
CString strId;
int nCount=m_List.GetItemCount();
for(int i=0;im_pszHelpFilePath;
str=AfxGetApp()->m_pszExeName;
path=path.Left(path.GetLength()-str.GetLength()-4);
IniFile.SetName("MsgList");
IniFile.SetPath(path);
BOOL bExist=IniFile.OpenIniFileForRead();
if(bExist)
{
CString strId,strTolVal;
for(int i=0;i<500;i++)
{
strId.Format("%.4d",i+1);
strTolVal.Empty();
IniFile.GetItemString("Data",strId,strTolVal);
if(!strTolVal.IsEmpty())
DataProcessIniVal(strTolVal,i+1);
}
}
}
void CMsgDemoView::DataProcessIniVal(CString strVal,int nLen)//进行处理,中间将;号内容分割开。
{
CString szTemp;
szTemp=strVal;
CString str[10];
int nSize=1;
while(1)
{
int nCount=szTemp.Find(';');
if(nCount==-1)
break;
str[nSize]=szTemp.Left(nCount);
szTemp=szTemp.Right(szTemp.GetLength()-nCount-1);
nSize++;
}
str[nSize]=szTemp;
//Insert ListCtrl Content
int nPos=m_List.GetItemCount();
if(!str[1].IsEmpty())
{
this->m_List.InsertItem(nPos,str[1]);
this->m_List.SetItemText(nPos,1,str[2]);
this->m_List.SetItemText(nPos,2,str[3]);
this->m_List.SetItemText(nPos,3,str[4]);
this->m_List.SetItemText(nPos,4,str[5]);
}
//Reset the temp value
m_strId[nLen]=str[1];
m_strContent[nLen]=str[2];
m_strNum[nLen]=str[3];
m_strbSend[nLen]=str[4];
m_strDes[nLen]=str[5];
}
void CMsgDemoView::OnRemoveAll()
{
// TODO: Add your command handler code here
if(MessageBox("确定要删除所有信息列表记录吗? ","询问信息",MB_OKCANCEL|MB_ICONQUESTION)==IDOK)
{
m_List.DeleteAllItems();
for(int i=0;i<500;i++)
{
m_strId[i+1].Empty();
m_strContent[i+1].Empty();
m_strNum[i+1].Empty();
m_strbSend[i+1].Empty();
m_strDes[i+1].Empty();
}
ResetIniFileVal();
}
}
void CMsgDemoView::ResetIniFileVal()
{
CIniFile IniFile;
CString str,path;
path=AfxGetApp()->m_pszHelpFilePath;
str=AfxGetApp()->m_pszExeName;
path=path.Left(path.GetLength()-str.GetLength()-4);
IniFile.SetName("MsgList");
IniFile.SetPath(path);
BOOL bExist=IniFile.OpenIniFileForWrite();
if(bExist)
{
IniFile.WriteSection("Data");
for(int i=0;i<500;i++)
{
CString strId,strTolVal;
strId.Format("%.4d",i+1);
strTolVal=m_strId[i+1]+";"+m_strContent[i+1]+";"+m_strNum[i+1]+";"+m_strbSend[i+1]
+";"+m_strDes[i+1];
IniFile.WriteItemString(strId,strTolVal);
}
}
}
void CMsgDemoView::ConnectToDatabase()
{
HRESULT hr;
try
{
hr = m_pConnection.CreateInstance("ADODB.Connection");//创建Connection对象
if(SUCCEEDED(hr))
{
hr = m_pConnection->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=JHWY.mdb","","",adModeUnknown);///连接数据库
///上面一句中连接字串中的Provider是针对ACCESS2000环境的,对于ACCESS97,需要改为:Provider=Microsoft.Jet.OLEDB.3.51; }
}
}
catch(_com_error e)///捕捉异常
{
CString errormessage;
errormessage.Format("连接数据库失败!\r\n错误信息:%s",e.ErrorMessage());
AfxMessageBox(errormessage);///显示错误信息
exit(0);
}
//read data from database and save to ini file
_RecordsetPtr m_pRecordset;
_variant_t RecordsAffected;
m_pRecordset.CreateInstance(__uuidof(Recordset));
m_pConnection->put_ConnectionTimeout(long(5));
// m_pRecordset =m_pConnection->Execute("select name from Realanaquantity where warn='warn'",
// &RecordsAffected,adCmdText);
//模拟量表
m_pRecordset->Open("select * from Realanaquantity where warn='warn'",// 查询DemoTable表中所有字段
m_pConnection.GetInterfacePtr(), // 获取库接库的IDispatch指针
adOpenDynamic,
adLockOptimistic,
adCmdText);
int nCount=1;
while(!m_pRecordset->adoEOF)
{
_variant_t var = m_pRecordset->GetCollect("ID");
if(var.vt != VT_NULL)
m_strId[nCount] = (LPCSTR)_bstr_t(var);
var = m_pRecordset->GetCollect("name");
if(var.vt != VT_NULL)
m_strContent[nCount] = (LPCSTR)_bstr_t(var);
nCount++;
m_pRecordset->MoveNext();
}
m_pRecordset->Close();
//电气量表
m_pRecordset->Open("select * from Realelecquantity where warn='warn'",// 查询DemoTable表中所有字段
m_pConnection.GetInterfacePtr(), // 获取库接库的IDispatch指针
adOpenDynamic,
adLockOptimistic,
adCmdText);
while(!m_pRecordset->adoEOF)
{
_variant_t var = m_pRecordset->GetCollect("ID");
if(var.vt != VT_NULL)
m_strId[nCount] = (LPCSTR)_bstr_t(var);
var = m_pRecordset->GetCollect("name");
if(var.vt != VT_NULL)
m_strContent[nCount] = (LPCSTR)_bstr_t(var);
nCount++;
m_pRecordset->MoveNext();
}
m_pRecordset->Close();
//开关量表
m_pRecordset->Open("select * from Realswitchamount where Attribute='warn'",// 查询DemoTable表中所有字段
m_pConnection.GetInterfacePtr(), // 获取库接库的IDispatch指针
adOpenDynamic,
adLockOptimistic,
adCmdText);
while(!m_pRecordset->adoEOF)
{
_variant_t var = m_pRecordset->GetCollect("ID");
if(var.vt != VT_NULL)
m_strId[nCount] = (LPCSTR)_bstr_t(var);
var = m_pRecordset->GetCollect("name");
if(var.vt != VT_NULL)
m_strContent[nCount] = (LPCSTR)_bstr_t(var);
nCount++;
m_pRecordset->MoveNext();
}
m_pRecordset->Close();
m_pRecordset->Release();
//设置保护单元报警
//20型号
m_strId[nCount]="200";
m_strContent[nCount]="过流保护动作";
m_strId[nCount+1]="201";
m_strContent[nCount+1]="速断保护动作";
m_strId[nCount+2]="202";
m_strContent[nCount+2]="低周减载动作";
m_strId[nCount+3]="203";
m_strContent[nCount+3]="保护重合闸动作";
m_strId[nCount+4]="204";
m_strContent[nCount+4]="不对应重合闸动作";
m_strId[nCount+5]="205";
m_strContent[nCount+5]="合闸后加速跳";
m_strId[nCount+6]="206";
m_strContent[nCount+6]="控电消失";
m_strId[nCount+7]="207";
m_strContent[nCount+7]="过流后加速跳";
//21型号
nCount+=8;
m_strId[nCount]="210";
m_strContent[nCount]="方向过流保护动作";
m_strId[nCount+1]="211";
m_strContent[nCount+1]="限时方向速断保护动作";
m_strId[nCount+2]="212";
m_strContent[nCount+2]="控电消失";
m_strId[nCount+3]="213";
m_strContent[nCount+3]="瞬时方向速断保护动作";
m_strId[nCount+4]="214";
m_strContent[nCount+4]="保护重合闸动作";
m_strId[nCount+5]="215";
m_strContent[nCount+5]="压力闭锁";
m_strId[nCount+6]="216";
m_strContent[nCount+6]="合闸后加速跳";
m_strId[nCount+7]="217";
m_strContent[nCount+7]="未用";
//40型号
nCount+=8;
m_strId[nCount]="400";
m_strContent[nCount]="过流保护动作";
m_strId[nCount+1]="401";
m_strContent[nCount+1]="速断保护动作";
m_strId[nCount+2]="402";
m_strContent[nCount+2]="控电消失";
m_strId[nCount+3]="403";
m_strContent[nCount+3]="瞬未用";
m_strId[nCount+4]="404";
m_strContent[nCount+4]="未用";
m_strId[nCount+5]="405";
m_strContent[nCount+5]="未用";
m_strId[nCount+6]="406";
m_strContent[nCount+6]="未用";
m_strId[nCount+7]="407";
m_strContent[nCount+7]="未用";
//50型号
nCount+=8;
m_strId[nCount]="500";
m_strContent[nCount]="未用";
m_strId[nCount+1]="501";
m_strContent[nCount+1]="A相I段电压回路断线";
m_strId[nCount+2]="502";
m_strContent[nCount+2]="B相I段电压回路断线";
m_strId[nCount+3]="503";
m_strContent[nCount+3]="C相I段电压回路断线";
m_strId[nCount+4]="504";
m_strContent[nCount+4]="A相II段电压回路断线";
m_strId[nCount+5]="505";
m_strContent[nCount+5]="B相II段电压回路断线";
m_strId[nCount+6]="506";
m_strContent[nCount+6]="C相II段电压回路断线";
m_strId[nCount+7]="507";
m_strContent[nCount+7]="+KM接地";
m_strId[nCount+8]="508";
m_strContent[nCount+8]="-KM接地";
m_strId[nCount+9]="509";
m_strContent[nCount+9]="A相I段母线接地";
m_strId[nCount+10]="5010";
m_strContent[nCount+10]="B相I段母线接地";
m_strId[nCount+11]="5011";
m_strContent[nCount+11]="C相I段母线接地";
m_strId[nCount+12]="5012";
m_strContent[nCount+12]="A相II段母线接地";
m_strId[nCount+13]="5013";
m_strContent[nCount+13]="B相II段母线接地";
m_strId[nCount+14]="5014";
m_strContent[nCount+14]="C相II段母线接地";
m_strId[nCount+15]="5015";
m_strContent[nCount+15]="未用";
//10型号
nCount+=16;
m_strId[nCount]="100";
m_strContent[nCount]="差动保护动作";
m_strId[nCount+1]="101";
m_strContent[nCount+1]="差动速断动作";
m_strId[nCount+2]="102";
m_strContent[nCount+2]="压力闭锁";
m_strId[nCount+3]="103";
m_strContent[nCount+3]="压力异常";
m_strId[nCount+4]="104";
m_strContent[nCount+4]="未用";
m_strId[nCount+5]="105";
m_strContent[nCount+5]="控电消失";
m_strId[nCount+6]="106";
m_strContent[nCount+6]="未用";
m_strId[nCount+7]="107";
m_strContent[nCount+7]="未用";
//11型号
nCount+=8;
m_strId[nCount]="110";
m_strContent[nCount]="过流保护动作";
m_strId[nCount+1]="111";
m_strContent[nCount+1]="本体重瓦斯动作";
m_strId[nCount+2]="112";
m_strContent[nCount+2]="有载重瓦斯动作";
m_strId[nCount+3]="113";
m_strContent[nCount+3]="本体轻瓦斯动作";
m_strId[nCount+4]="114";
m_strContent[nCount+4]="有载轻瓦斯动作";
m_strId[nCount+5]="115";
m_strContent[nCount+5]="过负荷";
m_strId[nCount+6]="116";
m_strContent[nCount+6]="超温";
m_strId[nCount+7]="117";
m_strContent[nCount+7]="未用";
//13型号
nCount+=8;
m_strId[nCount]="130";
m_strContent[nCount]="过流保护动作";
m_strId[nCount+1]="131";
m_strContent[nCount+1]="本体重瓦斯动作";
m_strId[nCount+2]="132";
m_strContent[nCount+2]="有载重瓦斯动作";
m_strId[nCount+3]="133";
m_strContent[nCount+3]="本体轻瓦斯动作";
m_strId[nCount+4]="134";
m_strContent[nCount+4]="有载轻瓦斯动作";
m_strId[nCount+5]="135";
m_strContent[nCount+5]="过负荷";
m_strId[nCount+6]="136";
m_strContent[nCount+6]="超温";
m_strId[nCount+7]="137";
m_strContent[nCount+7]="未用";
//12型号
nCount+=8;
m_strId[nCount]="120";
m_strContent[nCount]="过流保护动作";
m_strId[nCount+1]="121";
m_strContent[nCount+1]="速断保护动作";
m_strId[nCount+2]="122";
m_strContent[nCount+2]="本体重瓦斯动作";
m_strId[nCount+3]="123";
m_strContent[nCount+3]="有载重瓦斯动作";
m_strId[nCount+4]="124";
m_strContent[nCount+4]="本体轻瓦斯动作";
m_strId[nCount+5]="125";
m_strContent[nCount+5]="过负荷";
m_strId[nCount+6]="126";
m_strContent[nCount+6]="超高温";
m_strId[nCount+7]="127";
m_strContent[nCount+7]="未用";
m_strId[nCount+8]="128";
m_strContent[nCount+8]="未用";
m_strId[nCount+9]="129";
m_strContent[nCount+9]="未用";
m_strId[nCount+10]="1210";
m_strContent[nCount+10]="未用";
m_strId[nCount+11]="1211";
m_strContent[nCount+11]="未用";
m_strId[nCount+12]="1212";
m_strContent[nCount+12]="有载轻瓦斯动作";
m_strId[nCount+13]="1213";
m_strContent[nCount+13]="未用";
m_strId[nCount+14]="1214";
m_strContent[nCount+14]="超高温";
m_strId[nCount+15]="1215";
m_strContent[nCount+15]="未用";
//60型号
nCount+=16;
m_strId[nCount]="600";
m_strContent[nCount]="差动保护动作";
m_strId[nCount+1]="601";
m_strContent[nCount+1]="差动速断动作";
m_strId[nCount+2]="602";
m_strContent[nCount+2]="压力闭锁";
m_strId[nCount+3]="603";
m_strContent[nCount+3]="压力异常";
m_strId[nCount+4]="604";
m_strContent[nCount+4]="未用";
m_strId[nCount+5]="605";
m_strContent[nCount+5]="控电消失";
m_strId[nCount+6]="606";
m_strContent[nCount+6]="未用";
m_strId[nCount+7]="607";
m_strContent[nCount+7]="未用";
//61型号
nCount+=8;
m_strId[nCount]="610";
m_strContent[nCount]="过流保护动作";
m_strId[nCount+1]="611";
m_strContent[nCount+1]="过负荷";
m_strId[nCount+2]="612";
m_strContent[nCount+2]="过电压动作";
m_strId[nCount+3]="613";
m_strContent[nCount+3]="转子一点接地";
m_strId[nCount+4]="614";
m_strContent[nCount+4]="定子接地";
m_strId[nCount+5]="615";
m_strContent[nCount+5]="控电消失";
m_strId[nCount+6]="616";
m_strContent[nCount+6]="励磁熔断";
m_strId[nCount+7]="617";
m_strContent[nCount+7]="高压熔断";
//30型号
nCount+=8;
m_strId[nCount]="300";
m_strContent[nCount]="过流保护动作";
m_strId[nCount+1]="301";
m_strContent[nCount+1]="速断保护动作";
m_strId[nCount+2]="302";
m_strContent[nCount+2]="欠压保护动作";
m_strId[nCount+3]="303";
m_strContent[nCount+3]="过压保护动作";
m_strId[nCount+4]="304";
m_strContent[nCount+4]="零序过电压";
m_strId[nCount+5]="305";
m_strContent[nCount+5]="零序过电流";
m_strId[nCount+6]="306";
m_strContent[nCount+6]="控电消失";
m_strId[nCount+7]="307";
m_strContent[nCount+7]="未用";
ResetIniFileVal();
}
void CMsgDemoView::OnConfigReal()
{
// TODO: Add your command handler code here
CConfigMsgDlg dlg;
dlg.DoModal();
}
void CMsgDemoView::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
m_MsgSend.JudgeTimeToSendMsg();//判断进行发送
CView::OnTimer(nIDEvent);
}