DrawDib.h
上传用户:royluo
上传日期:2007-01-05
资源大小:1584k
文件大小:3k
源码类别:

游戏

开发平台:

Visual C++

  1. /*****************************************************************************
  2. *                                                                             
  3. *   DrawDib.h
  4. *                                                                             
  5. *   Electrical Engineering Faculty - Software Lab                             
  6. *   Spring semester 1998                                                      
  7. *                                                                             
  8. *   Tanks game                                                                
  9. *                                                                             
  10. *   Module description: interface for the CDrawDib class.
  11. *                       
  12. *                                                                             
  13. *   Authors: Eran Yariv - 28484475                                           
  14. *            Moshe Zur  - 24070856                                           
  15. *                                                                            
  16. *                                                                            
  17. *   Date: 23/09/98                                                           
  18. *                                                                            
  19. ******************************************************************************/
  20. //////////////////////////////////////////////////////////////////////
  21. //
  22. //  Creator : El Barto (ef00@luc.ac.be)
  23. //  Location : http://www.luc.ac.be/~ef00/ebgfx
  24. //  Date : 09-04-98
  25. //
  26. //////////////////////////////////////////////////////////////////////
  27. #if !defined(AFX_DRAWDIB_H__B1E2F1A3_CCA7_11D1_91CA_0020AFF82585__INCLUDED_)
  28. #define AFX_DRAWDIB_H__B1E2F1A3_CCA7_11D1_91CA_0020AFF82585__INCLUDED_
  29. #include  <vfw.h>
  30. #include "DIB.h"
  31. #if _MSC_VER >= 1000
  32. #pragma once
  33. #endif // _MSC_VER >= 1000
  34. class CDrawDib  
  35. {
  36. public:
  37.     HDRAWDIB m_hDrawDib;
  38.     HDRAWDIB Open ();
  39.     BOOL Close ();
  40.     
  41.     BOOL Begin ( HDC hdc, int dxDest, int dyDest,
  42.         LPBITMAPINFOHEADER lpbi, int dxSrc, int dySrc, UINT wFlags );
  43.     BOOL End ();
  44.     BOOL Draw ( HDC hdc, int xDst, int yDst,
  45.         int dxDst, int dyDst, LPBITMAPINFOHEADER lpbi, LPVOID lpBits,
  46.         int xSrc, int ySrc, int dxSrc, int dySrc, UINT wFlags );
  47.     BOOL DrawDib ( CDIB *Dib, HDC hdc, int xDst, int yDst,
  48.         int dxDst, int dyDst, UINT wFlags );
  49.     BOOL DrawDib ( CDIB *Dib, HDC hdc, int xDst, int yDst, int dxDst, int dyDst, 
  50.                    int xSrc, int ySrc, int dxSrc, int dySrc,
  51.                    UINT wFlags );
  52.     
  53.     LPVOID GetBuffer ( LPBITMAPINFOHEADER lpbi,
  54.         DWORD dwSize, DWORD dwFlags );
  55.     
  56.     BOOL ProfileDisplay ( LPBITMAPINFOHEADER lpbi );
  57.     HPALETTE GetPalette ();
  58.     BOOL SetPalette ( HPALETTE hpal );
  59.     BOOL ChangePalette (int iStart, int iLen, LPPALETTEENTRY lppe );
  60.     UINT Realize ( HDC hdc, BOOL fBackground );
  61.     BOOL Start ( LONG rate );
  62.     BOOL Stop ();
  63.     BOOL Time ( LPDRAWDIBTIME lpddtime );
  64.     CDrawDib ();
  65.     virtual ~CDrawDib ();
  66. };
  67. #endif // !defined(AFX_DRAWDIB_H__B1E2F1A3_CCA7_11D1_91CA_0020AFF82585__INCLUDED_)