📄 skinview.cpp
字号:
// SkinView.cpp : implementation file
//
#include "stdafx.h"
#include "dialog.h"
#include "SkinView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSkinView
CSkinView::CSkinView()
{
}
CSkinView::~CSkinView()
{
}
BEGIN_MESSAGE_MAP(CSkinView, CStatic)
//{{AFX_MSG_MAP(CSkinView)
ON_WM_PAINT()
ON_WM_ERASEBKGND()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSkinView message handlers
BOOL CSkinView::LoadBKImage(LPCTSTR szImagePath)
{
return m_bmpBK.LoadImage(szImagePath);
}
void CSkinView::OnPaint()
{
CPaintDC dc(this); // device context for painting
CRect rcClient;
GetClientRect(&rcClient);
CEnBitmap bmp;
if (m_bmpBK.m_hObject !=0)
m_bmpBK.ExtendDraw(&dc,rcClient,5,5);
//只画左右边框
CPen pen(PS_SOLID,1,m_ViewBorder);
CPen * oldPen=dc.SelectObject(&pen);
dc.MoveTo(rcClient.left ,rcClient.top);
dc.LineTo(rcClient.left ,rcClient.bottom );
dc.MoveTo(rcClient.right ,rcClient.top);
dc.LineTo(rcClient.right ,rcClient.bottom );
dc.SelectObject(&oldPen);
// Do not call CStatic::OnPaint() for painting messages
}
BOOL CSkinView::OnEraseBkgnd(CDC* pDC)
{
return TRUE;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -