📄 dcmemory.cpp
字号:
// DCMemory.cpp: implementation of the CDCMemory class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "multiboard.h"
#include "DCMemory.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CDCMemory::CDCMemory(CDC* pDC, const CRect& rcBounds): CDC()
{
CreateCompatibleDC(pDC);
m_bitmap.CreateCompatibleBitmap(pDC, rcBounds.Width(), rcBounds.Height());
m_oldBitmap = SelectObject(&m_bitmap);
m_pDC = pDC;
m_rcBounds = rcBounds;
}
CDCMemory::~CDCMemory()
{
m_pDC->BitBlt(m_rcBounds.left, m_rcBounds.top, m_rcBounds.Width(), m_rcBounds.Height(),
this, m_rcBounds.left, m_rcBounds.top, SRCCOPY);
SelectObject(m_oldBitmap);
m_bitmap.DeleteObject();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -