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

📄 progctrl.cpp

📁 基于WINCE
💻 CPP
字号:
// ProgCtrl.cpp : implementation file
//

#include "stdafx.h"
#include "Msg.h"
#include "ProgCtrl.h"

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

/////////////////////////////////////////////////////////////////////////////
// ProgCtrl

ProgCtrl::ProgCtrl()
{
	pDCBack=new CDC;
	pDCFore=new CDC;
	bmpBack.LoadBitmap(IDB_BACK);
	bmpFore.LoadBitmap(IDB_FORE);
}

ProgCtrl::~ProgCtrl()
{

}


BEGIN_MESSAGE_MAP(ProgCtrl, CStatic)
	//{{AFX_MSG_MAP(ProgCtrl)
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// ProgCtrl message handlers

void ProgCtrl::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	
	// TODO: Add your message handler code here
	GetClientRect(&m_rect);
	pDCBack->CreateCompatibleDC(&dc);
	pDCFore->CreateCompatibleDC(&dc);
	bmpBack.GetBitmap(&bmback);
	bmpFore.GetBitmap(&bmfore);
	pDCBack->SelectObject(bmpBack);
	dc.StretchBlt(0,0,m_rect.Width(),m_rect.Height(),pDCBack,
				  0,0,bmback.bmWidth,bmback.bmHeight,SRCCOPY);
	//delete  pDCBack;
	Sleep(3000);
	pDCFore->SelectObject(bmpFore);
	dc.StretchBlt(0,0,m_rect.Width(),m_rect.Height(),pDCFore,
				  0,0,bmfore.bmWidth,bmfore.bmHeight,SRCCOPY);
	Sleep(1000);
	// Do not call CStatic::OnPaint() for painting messages
}

⌨️ 快捷键说明

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