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

📄 childview.h

📁 C:Documents and SettingsAdministrator桌面VC++多媒体特效制作百例CHAR22Tearing
💻 H
字号:
// ChildView.h : interface of the CChildView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_CHILDVIEW_H__0CB519FC_BDF8_11D2_832A_833FE8A8E900__INCLUDED_)
#define AFX_CHILDVIEW_H__0CB519FC_BDF8_11D2_832A_833FE8A8E900__INCLUDED_

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

// DirectDraw header file
#include "ddraw.h"

// Local definitions
#define NUMBUFFERS	1
#define CANY		103
#define CANWIDTH	150
#define CANHEIGHT	273

/////////////////////////////////////////////////////////////////////////////
// CChildView window

class CChildView : public CWnd
{
// Construction
public:
	CChildView();

// Attributes
public:

// Operations
public:
	BOOL Create(BOOL bEnableFlipping = FALSE);
	LRESULT AnimateFrame();

protected:
	// ChildView.cpp
	BOOL InitDD();
	void ReleaseDDObjects();

	// Tearing DDraw.cpp
	HRESULT CreateSecondarySurface(int cx, int cy, IDirectDrawSurface** ppDDS);
	HRESULT LoadDDBitmap(UINT nID, IDirectDrawSurface** ppDDS);
	HRESULT CopyDDBitmap(CBitmap* pbmImage, IDirectDrawSurface* pDDS);
	HRESULT LoadDDPalette(UINT idBitmap, IDirectDrawPalette** ppDDP);
	HRESULT Blt(int iCurX);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CChildView)
	protected:
	virtual void PostNcDestroy();
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CChildView();

	// Generated message map functions
protected:
	int m_iCurX;
	BOOL m_bFlip;

	// Our DirectDraw object
	// See OnDestroy() for discussion.
	CComPtr<IDirectDraw> m_pIDirectDraw;

	// Our DirectDraw palette
	CComPtr<IDirectDrawPalette> m_lpDDPalette;

	// Our DirectDraw surfaces
	CComPtr<IDirectDrawSurface> m_lpDDSPrimary;
	CComPtr<IDirectDrawSurface> m_lpDDSSecondary;
	CComPtr<IDirectDrawSurface> m_lpDDSCan;

	//{{AFX_MSG(CChildView)
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	//}}AFX_MSG
	afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnDestroy();
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

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

#endif // !defined(AFX_CHILDVIEW_H__0CB519FC_BDF8_11D2_832A_833FE8A8E900__INCLUDED_)

⌨️ 快捷键说明

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