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

📄 scrollbitmapdlg.h

📁 Displaying a large bitmap file on a dialog box, in its original size, is quite difficult in the VC++
💻 H
字号:
// ScrollBitmapDlg.h : header file
//
//{{AFX_INCLUDES()
#include "commondialog.h"
//}}AFX_INCLUDES

#if !defined(AFX_SCROLLBITMAPDLG_H__182E617E_4374_4CD4_B7D0_F4B8A4E37BE4__INCLUDED_)
#define AFX_SCROLLBITMAPDLG_H__182E617E_4374_4CD4_B7D0_F4B8A4E37BE4__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// ScrollBitmapDlg.h: Header File.

// Written by Shibu K.V (shibukv@erdcitvm.org)
// Sr.Research Associate
// ASIC Hardware Design Group
// Electronics Research & Development Centre of India
// Trivandrum, Kerala, India.
// Copyright (c) 2002

// Warning: this code hasn't been subject to a heavy testing, so
// use it on your own risk. The author accepts no liability for the 
// possible damage caused by this code.
//
// Version 1.0  22 Oct 2002.

/////////////////////////////////////////////////////////////////////////////
// CScrollBitmapDlg dialog

class CScrollBitmapDlg : public CDialog
{
// Construction
public:
	CRect rectStaticClient;
	SCROLLINFO horz,vert;
	BOOL	flag, erase;
	int sourcex, sourcey,offsetx,offsety;
	CScrollBitmapDlg(CWnd* pParent = NULL);	// standard constructor
	// Dialog Data
	//{{AFX_DATA(CScrollBitmapDlg)
	enum { IDD = IDD_SCROLLBITMAP_DIALOG };
	CStatic	m_st1;
	CScrollBar	m_vbar;
	CScrollBar	m_hbar;
	CCommonDialog1	m_com;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CScrollBitmapDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;
	CDC m_dcMem;            // Compatible Memory DC for dialog
	
	HBITMAP m_hBmpOld;    // Handle of old bitmap to save
	HBITMAP m_hBmpNew;    // Handle of new bitmap from file
   
	BITMAP m_bmInfo;        // Bitmap Information structure
	CPoint m_pt;            // Position for upper left corner of bitmap
	CSize m_size;  

	// Generated message map functions
	//{{AFX_MSG(CScrollBitmapDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnShow();
	afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	virtual void OnOK();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SCROLLBITMAPDLG_H__182E617E_4374_4CD4_B7D0_F4B8A4E37BE4__INCLUDED_)

⌨️ 快捷键说明

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