agentedit.cpp

来自「最新visualC++编程200例书籍源码包括对数据库的操作」· C++ 代码 · 共 45 行

CPP
45
字号
// AgentEdit.cpp : implementation file
//

#include "stdafx.h"

#include "agentedit.h"

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

/////////////////////////////////////////////////////////////////////////////
// CAgentEdit

CAgentEdit::CAgentEdit()
{
}

CAgentEdit::~CAgentEdit()
{
}


BEGIN_MESSAGE_MAP(CAgentEdit, CEdit)
	//{{AFX_MSG_MAP(CAgentEdit)
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CAgentEdit message handlers

void CAgentEdit::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
}

void CAgentEdit::SetLines ( int nLines, int nFontSize )
{
	CRect rect;
	GetWindowRect ( &rect );
	SetWindowPos( NULL, 0, 0, rect.Width(), nFontSize * nLines, SWP_NOZORDER | SWP_NOMOVE );
}

⌨️ 快捷键说明

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