📄 whiteframe.cpp
字号:
// WhiteFrame.cpp : implementation file
//
#include "stdafx.h"
#include "a1.h"
#include "WhiteFrame.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CWhiteFrame
CWhiteFrame::CWhiteFrame()
{
}
CWhiteFrame::~CWhiteFrame()
{
}
BEGIN_MESSAGE_MAP(CWhiteFrame, CStatic)
//{{AFX_MSG_MAP(CWhiteFrame)
ON_WM_PAINT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CWhiteFrame message handlers
void CWhiteFrame::OnPaint()
{
CPaintDC dc(this); // device context for painting
CString str;
this->GetWindowText(str);
CRect rect;
this->GetClientRect(&rect);
dc.FillSolidRect(rect,RGB(254,254,254));
if(str!="")
{
CFont* font=this->GetFont();
dc.SetBkColor(RGB(254,254,254));
dc.SelectObject(font);
dc.TextOut(0,0,str);
}
else
{
dc.MoveTo(rect.left,rect.top);
dc.LineTo(rect.left,rect.bottom);
dc.MoveTo(rect.left,rect.top);
dc.LineTo(rect.right,rect.top);
COLORREF clrBtnShadow,clrBtnHilite,clrBtnDkShadow,clrBtnLight;
clrBtnShadow = ::GetSysColor(COLOR_BTNSHADOW);
clrBtnDkShadow = ::GetSysColor(COLOR_3DDKSHADOW);
clrBtnLight = ::GetSysColor(COLOR_3DLIGHT);
clrBtnHilite = ::GetSysColor(COLOR_BTNHIGHLIGHT);
dc.DrawEdge(rect,EDGE_RAISED,BF_BOTTOM|BF_RIGHT);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -