-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathIconDirEntry.hpp
60 lines (50 loc) · 1.28 KB
/
IconDirEntry.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef ICON_DIR_ENTRY_HPP
#define ICON_DIR_ENTRY_HPP
class IconDirEntry{
BYTE bWidth;
BYTE bHeight;
BYTE bColorCount;
BYTE bReserved;
USHORT wPlanes;
USHORT wBinCount;
ULONG dwBytesInRes;
ULONG dwImageOffset;
IconImage *datosImagen;
public:
//Constructor
IconDirEntry(){
bWidth = 0;
bHeight = 0;
bColorCount = 0;
bReserved = 0;
wPlanes = 0;
wBinCount = 0;
dwBytesInRes= 0;
dwImageOffset=0;
}
IconDirEntry(PBYTE pValores){
bWidth = (BYTE)*pValores;
bHeight = (BYTE)*(pValores+1);
bColorCount = (BYTE)*(pValores+2);
bReserved = (BYTE)*(pValores+3);
wPlanes = *((USHORT *)(pValores+4));
wBinCount = *((USHORT *)(pValores+6));
dwBytesInRes = *((ULONG *)(pValores+8));
dwImageOffset = *((ULONG *)(pValores+12));
}
//Setters
void setImageDta(IconImage *objeto){
datosImagen = objeto;
}
//Getters
BYTE getBWidth(){
return bWidth;
}
ULONG getDwImageOffset(){
return dwImageOffset;
}
IconImage *getIconImage(){
return datosImagen;
}
};
#endif