资源简介

modbus TCPIP协议client-Server端源代码以及解析

资源截图

代码片段和文件信息

// ClientsComView.cpp : implementation file
//

#include “stdafx.h“
#include “Modbusclient.h“
#include “ClientsComView.h“
#include “LCLayout.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif


enum eClientsComView {
    CLIENTSCOMVIEW_COL_TIME = 0
    CLIENTSCOMVIEW_COL_FROM
    CLIENTSCOMVIEW_COL_MESSAGE
};


/////////////////////////////////////////////////////////////////////////////
// CClientsComView

IMPLEMENT_DYNCREATE(CClientsComView CListView)

CClientsComView::CClientsComView()
{
}

CClientsComView::~CClientsComView()
{
}


BEGIN_MESSAGE_MAP(CClientsComView CListView)
//{{AFX_MSG_MAP(CClientsComView)
ON_WM_CREATE()
ON_COMMAND(ID_FILE_PRINT OnFilePrint)
ON_COMMAND(ID_FILE_SAVE_AS OnViewSaveAs)
ON_WM_DESTROY()
ON_UPDATE_COMMAND_UI(ID_FILE_PRINT OnUpdateFilePrint)
ON_UPDATE_COMMAND_UI(ID_FILE_SAVE_AS OnUpdateFileSaveAs)
ON_WM_PAINT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CClientsComView drawing

void CClientsComView::OnPaint()
{
CListCtrl& lc = GetListCtrl();

Default();

if (!lc.GetItemCount()) {

        CDC* pDC = GetDC();
        int nSavedDC = pDC->SaveDC();

        CRect rc;
        GetClientRect(&rc);

        CHeaderCtrl* pHC;
        pHC = lc.GetHeaderCtrl();
        if (pHC != NULL)
        {
            CRect rcH;
            pHC->GetItemRect(0 &rcH);
            rc.top += rcH.bottom;
        }

        pDC->FillRect(rc &CBrush(::GetSysColor(COLOR_WINDOW)));
pDC->SetBkMode(TRANSPARENT); 
        pDC->SelectStockobject(ANSI_VAR_FONT);
        pDC->DrawText(CString((LPCSTR)IDS_EMPTY_LIST) rc 
                      DT_CENTER|DT_WORDBREAK|DT_NOPREFIX|
  DT_NOCLIP|DT_VCENTER|DT_SINGLELINE);

        pDC->RestoreDC(nSavedDC);
        ReleaseDC(pDC);
}
}

/////////////////////////////////////////////////////////////////////////////
// CClientsComView printing

BOOL CClientsComView::OnPreparePrinting(CPrintInfo* pInfo)
{
   // return m_printer.OnPreparePrinting(pInfo this &GetListCtrl());
return true;
}

void CClientsComView::OnBeginPrinting(CDC* pDC CPrintInfo* pInfo)
{
    CTime   oTime   = CTime::GetCurrentTime();
    CString timeStr = oTime.Format(IDS_TIME_FORMAT);
    CString szAppName((LPCTSTR)IDR_MAINframe);
    CString szTabName((LPCTSTR)IDS_TAB_CLIENTSCOM);
CString szBuf;
szBuf.Format(“%s - %s“ szAppName szTabName);

   // m_printer.OnBeginPrinting(pDC pInfo szBuf timeStr);
}

void CClientsComView::OnEndPrinting(CDC* pDC CPrintInfo* pInfo)
{
   // m_printer.OnEndPrinting(pDC pInfo);
  //  CListView::OnEndPrinting(pDC pInfo);
}

/*============================================================================

Description:    See MFC.

Return:         -

============================================================================*/
void CClie

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     目录          0  2013-01-17 15:58  modbus TCPIP协议client-Server端源代码

     文件     335179  2003-01-17 16:59  modbus TCPIP协议client-Server端源代码\ModbusApplicationProtocol_v1_1.pdf

     目录          0  2013-01-17 15:58  modbus TCPIP协议client-Server端源代码\ModbusClient

     目录          0  2003-07-21 15:13  modbus TCPIP协议client-Server端源代码\ModbusClient\bak

     文件       1862  2003-01-21 09:31  modbus TCPIP协议client-Server端源代码\ModbusClient\bak\ModbusClientDoc.cpp

     文件       1541  2003-01-21 09:31  modbus TCPIP协议client-Server端源代码\ModbusClient\bak\ModbusClientDoc.h

     文件       2758  2003-01-24 09:32  modbus TCPIP协议client-Server端源代码\ModbusClient\bak\ModbusClientView.cpp

     文件       1993  2003-01-24 09:33  modbus TCPIP协议client-Server端源代码\ModbusClient\bak\ModbusClientView.h

     文件       9793  2003-03-02 22:08  modbus TCPIP协议client-Server端源代码\ModbusClient\ClientsComView.cpp

     文件       2092  2003-01-23 10:31  modbus TCPIP协议client-Server端源代码\ModbusClient\ClientsComView.h

     文件       1823  2003-03-03 10:04  modbus TCPIP协议client-Server端源代码\ModbusClient\ClientSocket.cpp

     文件       1415  2003-03-03 09:07  modbus TCPIP协议client-Server端源代码\ModbusClient\ClientSocket.h

     文件       1316  2003-01-25 09:11  modbus TCPIP协议client-Server端源代码\ModbusClient\ComData.cpp

     文件       1352  2002-08-04 11:44  modbus TCPIP协议client-Server端源代码\ModbusClient\ComData.h

     文件       2866  2003-01-24 13:40  modbus TCPIP协议client-Server端源代码\ModbusClient\DialogBarUtil.cpp

     文件       1531  2003-01-21 17:08  modbus TCPIP协议client-Server端源代码\ModbusClient\DialogBarUtil.h

     文件       1016  2002-08-04 11:44  modbus TCPIP协议client-Server端源代码\ModbusClient\DocumentHelper.cpp

     文件       1351  2002-08-04 11:44  modbus TCPIP协议client-Server端源代码\ModbusClient\DocumentHelper.h

     文件       6029  2002-08-04 11:44  modbus TCPIP协议client-Server端源代码\ModbusClient\InfoBar.cpp

     文件       1795  2002-08-04 11:44  modbus TCPIP协议client-Server端源代码\ModbusClient\InfoBar.h

     文件       4923  2002-08-04 11:44  modbus TCPIP协议client-Server端源代码\ModbusClient\LCLayout.cpp

     文件       2998  2002-08-04 11:44  modbus TCPIP协议client-Server端源代码\ModbusClient\LCLayout.h

     文件      14163  2003-03-04 09:13  modbus TCPIP协议client-Server端源代码\ModbusClient\MainFrm.cpp

     文件       2934  2003-03-03 10:04  modbus TCPIP协议client-Server端源代码\ModbusClient\MainFrm.h

     文件      10375  2003-03-04 11:31  modbus TCPIP协议client-Server端源代码\ModbusClient\MessageView.cpp

     文件       2102  2003-03-03 10:27  modbus TCPIP协议client-Server端源代码\ModbusClient\MessageView.h

     文件      67700  2003-03-03 10:27  modbus TCPIP协议client-Server端源代码\ModbusClient\ModbusClient.aps

     文件       4473  2003-04-28 15:28  modbus TCPIP协议client-Server端源代码\ModbusClient\ModbusClient.clw

     文件       4716  2003-01-24 13:56  modbus TCPIP协议client-Server端源代码\ModbusClient\ModbusClient.cpp

     文件       6947  2003-04-24 09:29  modbus TCPIP协议client-Server端源代码\ModbusClient\ModbusClient.dsp

............此处省略116个文件信息

评论

共有 条评论