⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 receiverview.cpp

📁 这是一个学习WinSocket编程的程序
💻 CPP
字号:
// ReceiverView.cpp : implementation of the CReceiverView class
//

#include "stdafx.h"
#include "Receiver.h"

#include "ReceiverDoc.h"
#include "ReceiverView.h"

#include "glb_fun.h"

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




/////////////////////////////////////////////////////////////////////////////
// CReceiverView

IMPLEMENT_DYNCREATE(CReceiverView, CFormView)

BEGIN_MESSAGE_MAP(CReceiverView, CFormView)
	//{{AFX_MSG_MAP(CReceiverView)
	ON_BN_CLICKED(IDC_CLEARBUTTON, OnClearbutton)
	//}}AFX_MSG_MAP
	// Standard printing commands
	ON_COMMAND(ID_FILE_PRINT, CFormView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CFormView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CFormView::OnFilePrintPreview)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CReceiverView construction/destruction

CReceiverView::CReceiverView()
	: CFormView(CReceiverView::IDD)
{
	//{{AFX_DATA_INIT(CReceiverView)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	// TODO: add construction code here

}

CReceiverView::~CReceiverView()
{
}

void CReceiverView::DoDataExchange(CDataExchange* pDX)
{
	CFormView::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CReceiverView)
	DDX_Control(pDX, IDC_REV_LIST, m_RevListBox);
	//}}AFX_DATA_MAP
}

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

	return CFormView::PreCreateWindow(cs);
}

void CReceiverView::OnInitialUpdate()
{
	CFormView::OnInitialUpdate();
	GetParentFrame()->RecalcLayout();
	ResizeParentToFit();

	CReceiverApp* pApp=(CReceiverApp*)AfxGetApp();
	pApp->m_pRevListBox = &m_RevListBox;
}

/////////////////////////////////////////////////////////////////////////////
// CReceiverView printing

BOOL CReceiverView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default preparation
	return DoPreparePrinting(pInfo);
}

void CReceiverView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add extra initialization before printing
}

void CReceiverView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add cleanup after printing
}

void CReceiverView::OnPrint(CDC* pDC, CPrintInfo* /*pInfo*/)
{
	// TODO: add customized printing code here
}

/////////////////////////////////////////////////////////////////////////////
// CReceiverView diagnostics

#ifdef _DEBUG
void CReceiverView::AssertValid() const
{
	CFormView::AssertValid();
}

void CReceiverView::Dump(CDumpContext& dc) const
{
	CFormView::Dump(dc);
}

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

/////////////////////////////////////////////////////////////////////////////
// CReceiverView message handlers

void CReceiverView::OnClearbutton() 
{
	// TODO: Add your control notification handler code here
	m_RevListBox.ResetContent ();
	rev_data[0]=0;
	iRevno=0;
}

⌨️ 快捷键说明

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