//NetTalk
/*------------------------------------------------------------------------------*\
 =============================
   模块名称: RippleWnd.h
 =============================
 
 [版权]
 
   2000-2002  115软件工厂  版权所有
                                              
\*------------------------------------------------------------------------------*/
#ifndef _RIPPLEWND_H_
#define _RIPPLEWND_H_
#include <ddraw.h>
#include "ddutil.h"
class CRippleWnd:public CWndX
{
public:
	BOOL Create(RECT& rc,HWND hParent,UINT uBmpID,int iWidth,int iHeight);
	virtual  ~CRippleWnd();
	CRippleWnd();

protected:
	DWORD m_dwFps;
	DWORD m_dwTime;
	
	int m_iWidth;
	int m_iHeight;
	void FreeObject();
	BOOL InitDDraw(UINT uBmpID,int iWidth,int iHeight);
	virtual LRESULT WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam);
	void DropStone(int x,int y,int stonesize,int stoneweight);
	void RenderRipple();
	void UpdateFrame();
	void RippleSpread();
	LPDIRECTDRAW            lpDD;           // DirectDraw对象
	LPDIRECTDRAWSURFACE     lpDDSPrimary;   // 主页面
	LPDIRECTDRAWSURFACE     lpDDSPic1;      // 离屏页面1
	LPDIRECTDRAWSURFACE     lpDDSPic2;      // 离屏页面1
	LPDIRECTDRAWCLIPPER		lpClipper;
	short * buf1;		
	short * buf2;
	int m_iCount;
};






#endif