3 * Purpose: ICON Image Class Loader and Writer
\r
5 /* ==========================================================
\r
6 * CxImageICO (c) 07/Aug/2001 Davide Pizzolato - www.xdp.it
\r
7 * For conditions of distribution and use, see copyright notice in ximage.h
\r
8 * ==========================================================
\r
10 #if !defined(__ximaICO_h)
\r
15 #if CXIMAGE_SUPPORT_ICO
\r
17 class CxImageICO: public CxImage
\r
19 typedef struct tagIconDirectoryEntry {
\r
27 DWORD dwImageOffset;
\r
30 typedef struct tagIconDir {
\r
37 CxImageICO(): CxImage(CXIMAGE_FORMAT_ICO) {m_dwImageOffset=0;}
\r
39 // bool Load(const TCHAR * imageFileName){ return CxImage::Load(imageFileName,CXIMAGE_FORMAT_ICO);}
\r
40 // bool Save(const TCHAR * imageFileName){ return CxImage::Save(imageFileName,CXIMAGE_FORMAT_ICO);}
\r
41 bool Decode(CxFile * hFile);
\r
42 bool Decode(FILE *hFile) { CxIOFile file(hFile); return Decode(&file); }
\r
44 #if CXIMAGE_SUPPORT_ENCODE
\r
45 bool Encode(CxFile * hFile, bool bAppend=false, int nPageCount=0);
\r
46 bool Encode(CxFile * hFile, CxImage ** pImages, int nPageCount);
\r
47 bool Encode(FILE *hFile, bool bAppend=false, int nPageCount=0)
\r
48 { CxIOFile file(hFile); return Encode(&file,bAppend,nPageCount); }
\r
49 bool Encode(FILE *hFile, CxImage ** pImages, int nPageCount)
\r
50 { CxIOFile file(hFile); return Encode(&file, pImages, nPageCount); }
\r
51 #endif // CXIMAGE_SUPPORT_ENCODE
\r
53 DWORD m_dwImageOffset;
\r