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

📄 fullpic.cpp

📁 基于EVC开发的图片集文件浏览和图片浏览为一体的程序
💻 CPP
字号:
// FullPic.cpp : implementation file
//

#include "stdafx.h"
#include "PicImg.h"
#include "FullPic.h"

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

/////////////////////////////////////////////////////////////////////////////
// CFullPic dialog
CFullPic::CFullPic(CWnd* pParent /*=NULL*/)
	: CDialog(CFullPic::IDD, pParent)
{
	//{{AFX_DATA_INIT(CFullPic)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}

void CFullPic::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CFullPic)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CFullPic, CDialog)
	//{{AFX_MSG_MAP(CFullPic)
	ON_WM_PAINT()
	ON_WM_LBUTTONDOWN()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CFullPic message handlers
extern CDC m_dcMem;
BOOL CFullPic::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	ShowWindow(SW_SHOWMAXIMIZED);
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CFullPic::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
/*	
	// TODO: Add your message handler code here
    HDC hdcSrc = CreateCompatibleDC(NULL);
    HDC hdcDst = CreateCompatibleDC(NULL);
    HBITMAP hbmOld, hbmOld2, hbmNew;
    BITMAP bm;
	CBitmap *old_bitmap;
    GetObject(m_OrigBMP, sizeof(bm), &bm);
	
    hbmOld = (HBITMAP)SelectObject(hdcSrc, m_OrigBMP);
    hbmNew = CreateBitmap( iFullWidth, iFullHeight, bm.bmPlanes, bm.bmBitsPixel, NULL);
    hbmOld2 = (HBITMAP)SelectObject(hdcDst, hbmNew);
	
	StretchBlt(hdcDst, 0, 0, iFullWidth, iFullHeight, hdcSrc, 0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);
	
	
	SelectObject(hdcSrc, hbmOld);
	
    DeleteDC(hdcSrc);
    DeleteDC(hdcDst);

	CDC memDC;
	memDC.CreateCompatibleDC(&dc);
	CBitmap m_bitmap;
	m_bitmap.Attach(hbmNew);
	old_bitmap=memDC.SelectObject(&m_bitmap);
	dc.BitBlt(0,0,iFullWidth,iFullHeight,&memDC,0,0,SRCCOPY);
	memDC.SelectObject(old_bitmap);
	*/
	
}

void CFullPic::OnLButtonDown(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default
	CDialog::OnLButtonDown(nFlags, point);
	OnOK();
}

⌨️ 快捷键说明

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