?? xmemdc.cpp
字號:
// XMemDC.cpp: implementation of the XMemDC class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "XMemDC.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
XMemDC::XMemDC(CDC* pDC,const CRect& rcBounds):CDC()
{
CreateCompatibleDC(pDC);
m_bitmap=new CBitmap;
m_bitmap->CreateCompatibleBitmap(pDC,rcBounds.Width(),rcBounds.Height());
m_oldBitmap=SelectObject(m_bitmap);
m_pDC=pDC;
m_rcBounds=rcBounds;
}
XMemDC::~XMemDC()
{
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);
if(m_bitmap!=NULL)
delete m_bitmap;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -