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

📄 newstatic.cpp

📁 具有添加,删除,修改,更新的功能,用ado读ini文件访问数据库
💻 CPP
字号:
// NewStatic.cpp : implementation file
//

#include "stdafx.h"
#include "NewStatic.h"

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

/////////////////////////////////////////////////////////////////////////////
// CNewStatic

CNewStatic::CNewStatic()
{
}

CNewStatic::~CNewStatic()
{
}


BEGIN_MESSAGE_MAP(CNewStatic, CStatic)
	//{{AFX_MSG_MAP(CNewStatic)
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CNewStatic message handlers

void CNewStatic::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	CRect rc;
	GetClientRect(&rc);
	CBrush brush, *pOldbrush;
	brush.CreateSolidBrush(RGB(236, 246, 255));
	pOldbrush=dc.SelectObject(&brush);
	dc.FillRect(&rc, &brush);
	dc.SelectObject(pOldbrush);

	CString text;
	GetWindowText(text);
	
	dc.SetBkMode(TRANSPARENT);
	dc.SelectObject(this->GetFont());
//	dc.SetTextColor(RGB(0x99, 0xcc, 0xff));
	dc.DrawText(text, rc, DT_CENTER|DT_SINGLELINE);
	// TODO: Add your message handler code here
	// Do not call CStatic::OnPaint() for painting messages
}

⌨️ 快捷键说明

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