⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mybitmap.cpp

📁 自动九宫拼图游戏
💻 CPP
字号:
// MyBitmap.cpp: implementation of the CMyBitmap class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "拼图游戏.h"
#include "MyBitmap.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CMyBitmap::CMyBitmap()
{

}

CMyBitmap::~CMyBitmap()
{

}
void CMyBitmap::Draw(CDC*pDC,int x,int y)
{
	BITMAP bm;
	GetBitmap(&bm);
	CPoint size(bm.bmWidth,bm.bmHeight);
	pDC->DPtoLP(&size);
	CPoint org(0,0);
	pDC->DPtoLP(&org);
	CDC dcMem;
	dcMem.CreateCompatibleDC(pDC);
	CBitmap* pOldBitmap=dcMem.SelectObject(this);
	dcMem.SetMapMode(pDC->GetMapMode());
	pDC->BitBlt(x,y,size.x,size.y,&dcMem,org.x,org.y,SRCCOPY);
	dcMem.SelectObject(pOldBitmap);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -