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

📄 user interfurceview.cpp

📁 VC++ MFC 用户图形界面设计及改变测试
💻 CPP
字号:
// User InterfurceView.cpp : implementation of the CUserInterfurceView class
//

#include "stdafx.h"
#include "User Interfurce.h"

#include "User InterfurceDoc.h"
#include "User InterfurceView.h"
#include "MainFrm.h"

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

/////////////////////////////////////////////////////////////////////////////
// CUserInterfurceView

IMPLEMENT_DYNCREATE(CUserInterfurceView, CView)

BEGIN_MESSAGE_MAP(CUserInterfurceView, CView)
	//{{AFX_MSG_MAP(CUserInterfurceView)
	ON_WM_MOUSEMOVE()
	//}}AFX_MSG_MAP
	// Standard printing commands
	ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CUserInterfurceView construction/destruction

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

}

CUserInterfurceView::~CUserInterfurceView()
{
}

BOOL CUserInterfurceView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
// 	//  the CREATESTRUCT cs
//     cs.lpszClass = _T("dimple");
	//  [1/27/2009 0:37:08 Liuj]
/*	cs.lpszClass = AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW,LoadCursor(NULL,IDC_CROSS),(HBRUSH)GetStockObject(BLACK_BRUSH),0);*/
	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CUserInterfurceView drawing

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

/////////////////////////////////////////////////////////////////////////////
// CUserInterfurceView printing

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CUserInterfurceView diagnostics

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CUserInterfurceView message handlers

void CUserInterfurceView::OnMouseMove(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default
	CString strPosition;
	strPosition.Format(_T("(%d,%d)"),point.x,point.y);

  ((CMainFrame*)GetParent())->m_wndStatusBar.SetWindowText(strPosition);
	CView::OnMouseMove(nFlags, point);
}

⌨️ 快捷键说明

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