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

📄 bedlamiteview.cpp

📁 The ITU-T(Telecommunication Standardization Sector)is a permanent organ of the International Telecom
💻 CPP
字号:
// BedlamiteView.cpp : implementation of the CBedlamiteView class
//

#include "stdafx.h"
#include "Bedlamite.h"

#include "BedlamiteView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CBedlamiteView

IMPLEMENT_DYNCREATE(CBedlamiteView, CListView)

BEGIN_MESSAGE_MAP(CBedlamiteView, CListView)
	//{{AFX_MSG_MAP(CBedlamiteView)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG_MAP
	// Standard printing commands
	ON_COMMAND(ID_FILE_PRINT, CListView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CListView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CListView::OnFilePrintPreview)
	ON_MESSAGE(WM_DISPLAYRESULT, OnDisplayResult)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CBedlamiteView construction/destruction

CBedlamiteView::CBedlamiteView()
{
	// TODO: add construction code here

}

CBedlamiteView::~CBedlamiteView()
{
}

BOOL CBedlamiteView::PreCreateWindow(CREATESTRUCT& cs)
{
	cs.style |= LVS_REPORT;

	return CListView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CBedlamiteView drawing

void CBedlamiteView::OnDraw(CDC* pDC)
{
	CBedlamiteDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	// TODO: add draw code for native data here
}

void CBedlamiteView::OnInitialUpdate()
{
	CListView::OnInitialUpdate();

	ASSERT(GetStyle() & LVS_REPORT);
	CListCtrl& theCtrl = GetListCtrl();
	theCtrl.InsertColumn(0, _T("问题集"), LVCFMT_LEFT, 260);
}

/////////////////////////////////////////////////////////////////////////////
// CBedlamiteView printing

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CBedlamiteView diagnostics

#ifdef _DEBUG
void CBedlamiteView::AssertValid() const
{
	CListView::AssertValid();
}

void CBedlamiteView::Dump(CDumpContext& dc) const
{
	CListView::Dump(dc);
}

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

/////////////////////////////////////////////////////////////////////////////
// CBedlamiteView message handlers

void CBedlamiteView::OnDisplayResult(WPARAM wParam, LPARAM lParam)
{
	CString s = (char*)(BSTR)wParam;
	CListCtrl& theCtrl = GetListCtrl();
	theCtrl.InsertItem(0, s);
}

⌨️ 快捷键说明

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