?? ctsclientview.cpp
字號:
// 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
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -