Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

DIBitmap.h

Go to the documentation of this file.
00001 // DIBitmap.h: interface for the DIBitmap class
00004 
00005 
00006 #if !defined(AFX_DIBITMAP_H__0CD63B7F_6A96_49D0_AC45_F08FC9CC900F__INCLUDED_)
00007 #define AFX_DIBITMAP_H__0CD63B7F_6A96_49D0_AC45_F08FC9CC900F__INCLUDED_
00008 
00009 #if _MSC_VER > 1000
00010 #pragma once
00011 #endif // _MSC_VER > 1000
00012 
00020 class DIBitmap  
00021 {
00022 public:
00023     bool saveFile(PCTSTR, const DWORD = CREATE_ALWAYS) const;
00024     bool loadFile(PCTSTR);
00025 
00026     static bool isCompatibleBitmap(const PBITMAPINFOHEADER);
00027 
00028     bool createCompatible(const int, const int, const int);
00029     bool set(const PBITMAPINFO);
00030 
00031     const DIBitmap &operator=(const DIBitmap&);
00032     
00036     void clear() { imageMemDealloc(); } 
00037 
00044     const PBITMAPINFO getPBITMAPINFO() const { return (BITMAPINFO*) this->bmInfoHeader; }
00045 
00052     const PBITMAPINFOHEADER getPBITMAPINFOHEADER() const { return this->bmInfoHeader; }
00053 
00060     BYTE* getPBytes() const { return this->imageBytes; }
00061 
00068     RGBQUAD* getPPalette() const { return this->RGBQuads; }
00069 
00076     operator PBITMAPINFO () const { return (BITMAPINFO*) this->bmInfoHeader; }
00077 
00078     DIBitmap();
00079     DIBitmap(const DIBitmap &);
00080     virtual ~DIBitmap();
00081 private:
00082     imageMemDealloc();
00083     bool imageMemAlloc(const PBITMAPINFOHEADER);
00084 
00085     BITMAPINFOHEADER* bmInfoHeader; 
00086     RGBQUAD* RGBQuads;      
00087     BYTE* imageBytes;       
00088     BYTE* assignedMemory;   
00089 };
00090 
00091 #endif // !defined(AFX_DIBITMAP_H__0CD63B7F_6A96_49D0_AC45_F08FC9CC900F__INCLUDED_)

Generated on Mon Mar 25 06:29:59 2002 for Window Dressing by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001