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

📄 changetitleview.cpp

📁 随时改变窗口标题栏的内容
💻 CPP
字号:
// ChangeTitleView.cpp : implementation of the CChangeTitleView class
//

#include "stdafx.h"
#include "ChangeTitle.h"

#include "ChangeTitleDoc.h"
#include "ChangeTitleView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
	#define Line 10
    #define Col 9
/////////////////////////////////////////////////////////////////////////////
// CChangeTitleView

IMPLEMENT_DYNCREATE(CChangeTitleView, CHtmlView)

BEGIN_MESSAGE_MAP(CChangeTitleView, CHtmlView)
	//{{AFX_MSG_MAP(CChangeTitleView)
		// 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, CHtmlView::OnFilePrint)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CChangeTitleView construction/destruction

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

}

CChangeTitleView::~CChangeTitleView()
{
}

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

	return CHtmlView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CChangeTitleView drawing

void CChangeTitleView::OnDraw(CDC* pDC)
{
	CChangeTitleDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);

	int i,j;
     int glox[Line][Col];
    for (i=0;i<Line;i++)
	{
		for(j=0;j<Col;j++)
			glox[i][j]=131+i*26+j*26;
	}
    for (i=0;i<Line;i++)
	{
		for(j=0;j<Col;j++)
		{
            CString str="";
			str.Format("%3d",glox[i][j]);
			pDC->TextOut(0+j*8,0+i*8,str,sizeof(glox)/sizeof(glox[0][0]));
		}
	}
}

void CChangeTitleView::OnInitialUpdate()
{
	CHtmlView::OnInitialUpdate();

	// TODO: This code navigates to a popular spot on the web.
	//  change the code to go where you'd like.
	//Navigate2(_T("http://www.microsoft.com/visualc/"),NULL,NULL);
}

/////////////////////////////////////////////////////////////////////////////
// CChangeTitleView printing


/////////////////////////////////////////////////////////////////////////////
// CChangeTitleView diagnostics

#ifdef _DEBUG
void CChangeTitleView::AssertValid() const
{
	CHtmlView::AssertValid();
}

void CChangeTitleView::Dump(CDumpContext& dc) const
{
	CHtmlView::Dump(dc);
}

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

/////////////////////////////////////////////////////////////////////////////
// CChangeTitleView message handlers

⌨️ 快捷键说明

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