[dad864]: chui.h  Maximize  Restore  History

Download this file

90 lines (78 with data), 1.7 kB

 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// chui.h: interface for the Cchui class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_CHUI_H__7FF0AA38_56CA_40F3_87E2_70786A296470__INCLUDED_)
#define AFX_CHUI_H__7FF0AA38_56CA_40F3_87E2_70786A296470__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class Cchui
{
private:
int fhandle;
int startpoint;
int maxlen;
int fullsize;
public:
chui_header header;
chui_window *windows;
POINT *controltable; //x: offset, y: size
chui_control_common *controls;
BYTE **extensions;
int windowcnt, controlcnt;
int revision;
bool m_changed;
Cchui();
virtual ~Cchui();
int ReadChuiFromFile(int fhandle, long maxlen);
int WriteChuiToFile(int fhandle, int calculate);
CString RetrieveMosRef(int fh);
inline void KillWindows()
{
if(windows)
{
delete [] windows;
windows=NULL;
windowcnt=0;
}
}
inline void KillControls()
{
int i;
if(controls)
{
delete [] controls;
controls=NULL;
}
if(controltable)
{
delete [] controltable;
controltable=NULL;
}
if(extensions)
{
for(i=0;i<controlcnt;i++)
{
if(extensions[i])
{
delete [] extensions[i];
extensions[i]=NULL;
}
}
delete [] extensions;
extensions=NULL;
}
controlcnt=0;
}
private:
int adjust_actpoint(long offset);
inline long myseek(long pos)
{
return lseek(fhandle, pos+startpoint,SEEK_SET)-startpoint;
}
inline long actpoint()
{
return tell(fhandle)-startpoint;
}
};
#endif // !defined(AFX_CHUI_H__7FF0AA38_56CA_40F3_87E2_70786A296470__INCLUDED_)

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks