📄 xstatic.cpp
字号:
// xstatic.cpp : implementation file for CXstatic class
// (c) Dialogic corp 1995, 1996
#include "stdafx.h"
#include "xstatic.h"
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CXstatic
CXstatic::CXstatic()
{
m_Colorref = RGB(0, 0, 255);
}
CXstatic::~CXstatic()
{
}
BEGIN_MESSAGE_MAP(CXstatic, CStatic)
//{{AFX_MSG_MAP(CXstatic)
ON_WM_PAINT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CXstatic message handlers
void CXstatic::OnPaint()
{
CPaintDC dc(this); // device context for painting
CRect rect;
//dc.SetBkColor(RGB(255, 0, 0));
GetClientRect(&rect);
CBrush brush(m_Colorref);
//CPen pen(PS_SOLID, 2, RGB(0, 0, 255));
//dc.SelectObject(&pen);
CBrush *pOldBrush = dc.SelectObject(&brush);
if(NULL == pOldBrush) return;
dc.Ellipse(rect);
dc.SelectObject(pOldBrush);
// Do not call CStatic::OnPaint() for painting messages
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -