home *** CD-ROM | disk | FTP | other *** search
/ NEXT Generation 27 / NEXT27.iso / pc / demos / emperor / dx3.exe / SDK / SAMPLES / IKLOWNS / INCLUDE / DIBFILE.H < prev    next >
C/C++ Source or Header  |  1996-08-28  |  2KB  |  78 lines

  1. /*===========================================================================*\
  2. |
  3. |  File:        dibfile.h
  4. |
  5. |  Description: 
  6. |       Classes for saving DIB files
  7. |       
  8. |-----------------------------------------------------------------------------
  9. |
  10. |  Copyright (C) 1995-1996 Microsoft Corporation.  All Rights Reserved.
  11. |
  12. |  Written by Moss Bay Engineering, Inc. under contract to Microsoft Corporation
  13. |
  14. \*===========================================================================*/
  15.  
  16. #ifndef DIBFILE_H
  17. #define DIBFILE_H
  18.  
  19. #include <windows.h>
  20. #include "cgdib.h"
  21.  
  22. #if 0
  23. class TempBackupFile
  24. {
  25. public:
  26.     // constructor makes a temporary backup copy of the file
  27.     TempBackupFile(char* pOrgFileName);
  28.  
  29.     // if Commit() never called, destructor restores the original file from the backup
  30.     virtual ~TempBackupFile();
  31.  
  32.     void Commit();      // commit the org file by disgarding the temp backup
  33.  
  34. private:
  35.     char* mpTempFileName;
  36.     char* mpOrgFileName;
  37. };
  38. #endif
  39.  
  40. // writes a DIB file
  41. class DIBWriteFile : public CGameDIB
  42. {
  43. public:
  44.     // constructor creates the DIB file & the DIBWriteFile object
  45.     DIBWriteFile(char* pFileName, LPBITMAPINFO pBmi);
  46.  
  47.     // destructor closes the file & deletes the DIBWriteFile object
  48.     virtual ~DIBWriteFile();
  49.  
  50. #if 0
  51.     HBITMAP GetHBitmap()
  52.     {
  53.         return mhBitmap;
  54.     }
  55.  
  56.     LPVOID GetBits()
  57.     {
  58.         return mpBits;
  59.     }
  60. #endif
  61.  
  62.     void Write();
  63.  
  64. //  void SetColorTable( LPBITMAPINFO pBmi );
  65.     void SetColorTable( CGameDIB* pDIB );
  66.     void FillDIB( BYTE color );     // fill the DIB with color
  67.  
  68. private:
  69. //  TempBackupFile* mpTempBackup;
  70. //  HBITMAP mhBitmap;
  71. //  LPBITMAPINFO mpInfo;    // ptr to our BITMAPINFO
  72. //  LPVOID mpBits;          // ptr to DIB bits
  73.  
  74. //  char* mpFileName;
  75. };
  76.  
  77. #endif // DIBFILE_H
  78.