?? xview.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 + -