ctsclientview.cpp

来自「码头手持机项目,用于统计集装箱,轮船的情况,手持机采用S3C2440处理器,数据」· C++ 代码 · 共 85 行

CPP
85
字号
// CTSClientView.cpp : implementation of the CCTSClientView class
//

#include "stdafx.h"
#include "CTSClient.h"

#include "CTSClientDoc.h"
#include "CTSClientView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CCTSClientView

IMPLEMENT_DYNCREATE(CCTSClientView, CView)

BEGIN_MESSAGE_MAP(CCTSClientView, CView)
	//{{AFX_MSG_MAP(CCTSClientView)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCTSClientView construction/destruction
extern SOCKET clientSocket;
CCTSClientView::CCTSClientView()
{
	// TODO: add construction code here

}

CCTSClientView::~CCTSClientView()
{
	char endch='\2';
    send(clientSocket,&endch,1,0);
	shutdown(clientSocket,2);
    closesocket(clientSocket);
}

BOOL CCTSClientView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CCTSClientView drawing

void CCTSClientView::OnDraw(CDC* pDC)
{
	CCTSClientDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);

	// TODO: add draw code for native data here
}

/////////////////////////////////////////////////////////////////////////////
// CCTSClientView diagnostics

#ifdef _DEBUG
void CCTSClientView::AssertValid() const
{
	CView::AssertValid();
}

void CCTSClientView::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}

CCTSClientDoc* CCTSClientView::GetDocument() // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CCTSClientDoc)));
	return (CCTSClientDoc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CCTSClientView message handlers

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?