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

📄 cdbigsmall.cpp

📁 Wince 下的画图软件的源代码,是一款不错的EVC图形编辑软件,可以直接作为PMP的配套软件.
💻 CPP
字号:
#include "stdafx.h"
//#include "draw.h"
#include"CDBigsmall.h"
//#include "MainFrm.h"
//#include "Sipapi.h" 

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

/////////////////////////////////////////////////////////////////////////////
// CDBigsmall

CDBigsmall::CDBigsmall()
{
	HBITMAP   hBitmap,hOldBitmap;
	HDC hdc;
	hdc=CreateDC(L"DISPLAY",NULL,NULL,NULL);
	hScrDC=CreateCompatibleDC(hdc);
	hBitmap = CreateCompatibleBitmap(hdc, iScreenWidth, iScreenHeight);              
    hOldBitmap = (HBITMAP)SelectObject(hScrDC,hBitmap);
	::DeleteObject(hBitmap);
	::DeleteObject(hOldBitmap);
}

CDBigsmall::~CDBigsmall()
{
}


BEGIN_MESSAGE_MAP(CDBigsmall, CStatic)
	//{{AFX_MSG_MAP(CDBigsmall)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDBigsmall message handlers

void CDBigsmall::DrawZoom(CDC *pDC) 
{
	CPaintDC pDC1(this);  
//	CDC *pDC=GetWindowDC();
//GetScreen();

	int P_x,P_y;
	P_x=m_FirstPoint.x-20;
	P_y=m_FirstPoint.y-20;
	if(P_x<0)P_x=0;
	if(P_y<0)P_x=0;
	//StretchBlt(pDC1.m_hDC,iScreenWidth-80,iScreenHeight-80-25,80,80,hMemDC,P_x,P_y,40,40,SRCCOPY);  
	StretchBlt(pDC1.m_hDC,0,0,80,80,hMemDC,P_x,P_y,40,40,SRCCOPY);  
	BitBlt(pDC1.m_hDC,0,0,80,80,hMemDC,P_x,P_y,SRCCOPY);
}




 

void CDBigsmall::GetScreen()
{
	HBITMAP   hBitmap,hOldBitmap;
		
	int   xScrn,yScrn;
	int   nWidth,nHeight;


//	SipShowIM(SIPF_OFF);
	xScrn=25;
	yScrn=28;

	nWidth=iScreenWidth-xScrn;
	nHeight=iScreenHeight-yScrn;

	hScrDC=CreateDC(L"DISPLAY",NULL,NULL,NULL);
	hMemDC=CreateCompatibleDC(hScrDC);
	hBitmap = CreateCompatibleBitmap(hScrDC, nWidth, nHeight);              
        hOldBitmap = (HBITMAP)SelectObject(hMemDC,hBitmap);
	
	BitBlt(hMemDC,0,0,nWidth,nHeight,hScrDC,xScrn,yScrn,SRCCOPY);
	::DeleteObject(hBitmap);
	::DeleteObject(hOldBitmap);
}

⌨️ 快捷键说明

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