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

📄 xview.cpp

📁 全屏显示
💻 CPP
字号:
#include "stdafx.h"
#include "FullView.h"
#include "MainFrm.h"
#include "FullViewDoc.h"
#include "CView.h"

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

IMPLEMENT_DYNCREATE(CXView, CView)

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

CXView::CXView()
{
}

CXView::~CXView()
{
}

void CXView::OnDraw(CDC* pDC)
{
	//在屏幕上画一个大的×,在中心写上文档标题;
	CRect rectClient;
	GetClientRect(rectClient);

	pDC->MoveTo(rectClient.left, rectClient.top);
	pDC->LineTo(rectClient.right, rectClient.bottom);
	pDC->MoveTo(rectClient.right, rectClient.top);
	pDC->LineTo(rectClient.left, rectClient.bottom);

	CWnd * pWnd = GetParentFrame();
	CString str;
	pWnd->GetWindowText(str);
	CSize sizeTitle=pDC->GetTextExtent(str);
	pDC->TextOut(rectClient.CenterPoint().x-sizeTitle.cx/2,rectClient.CenterPoint().y-sizeTitle.cy/2,str);
}

⌨️ 快捷键说明

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