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

📄 flipbdlg.h

📁 VisualC++多媒体开发指南》一书的光盘源代码
💻 H
字号:
// flipbdlg.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CFlipbookDlg dialog

#include "dibapi.h"

//Position in bitmap of upper left corner
//of first frame.
#define X_START 4
#define Y_START 5

//X and Y distances between frames.
#define X_INCR 140
#define Y_INCR 140

//Frame size.
#define X_SIZE 126
#define Y_SIZE 133

//Rows and columns.
#define NUM_ROWS 4
#define NUM_COLS 4

//Direction constants.
#define FORWARD 1
#define REVERSE 0

//Animation speed.
#define ANIM_SPEED 50

class CFlipbookDlg : public CDialog
{
// Construction
public:
	CFlipbookDlg(CWnd* pParent = NULL);	// standard constructor
	CFlipbookDlg::~CFlipbookDlg(void);

// Dialog Data
	//{{AFX_DATA(CFlipbookDlg)
	enum { IDD = IDD_FLIPBOOK_DIALOG };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

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

// Implementation
protected:
	HICON m_hIcon;

private:
	CPalette* m_palette;
	HDIB m_hDIB;
	CRect m_outRect;	//Output rectangle on dialog box.
	int m_row;			//Current row in source bitmap.
	int m_col;			//Current column.
	int m_direction;	

	// Generated message map functions
	//{{AFX_MSG(CFlipbookDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnForward();
	afx_msg void OnReverse();
	afx_msg void OnTimer(UINT nIDEvent);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

⌨️ 快捷键说明

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