#include <math.h>
#include "WinGDI.h"
#pragma comment(lib,
"Msimg32.lib"
)
namespace
{
namespace
{
namespace
{
bool
(
::
,
::
)
{
return
(
(),
())!=
0
;
}
::
(
,
,
,
,
bool
)
{
if
(
)
{
=
((
int
)
, (
int
)
, (
int
)
, (
int
)
);
}
else
{
=
((
int
)
, (
int
)
, (
int
)
, (
int
)
);
}
}
::
(
,
bool
)
{
if
(
)
{
=
(&
);
}
else
{
=
CreateEllipticRgnIndirect
(&
);
}
}
::
(
,
,
,
,
,
)
{
=
((
int
)
, (
int
)
, (
int
)
, (
int
)
, (
int
)
, (
int
)
);
}
::
(
*
,
,
bool
)
{
FHandle=CreatePolygonRgn(Points, (int)Count, Alternate?ALTERNATE:WINDING);
}
::
(
::
)
{
=
(
0
,
0
,
1
,
1
);
CombineRgn(FHandle, Region->GetHandle(), Region->GetHandle(), RGN_COPY);
}
::
(
::
,
::
,
)
{
=
(
0
,
0
,
1
,
1
);
(
,
(),
(), (
int
)
);
}
::
(
)
{
=
;
}
::
()
{
(
);
}
::
()
{
return
;
}
bool
::
(
)
{
return
(
,
.
,
.
)!=
0
;
}
bool
::
(
)
{
return
(
, &
)!=
0
;
}
::
()
{
={
0
,
0
,
0
,
0
};
(
, &
Rect
);
return
Rect
;
}
void
::
(
,
)
{
(
, (
int
)
, (
int
)
);
}
::
(
)
{
;
}
::
(
const
&
)
{
.
;
}
&
::
(
const
&
)
{
.
;
return
*
this
;
}
::
(
const
&
)
{
;
(&
Result
,
(),
.
());
return
Result
;
}
const
*
::
()
const
{
return
&
;
}
::
(
float
,
float
)
{
;
Transform
.
=
1.0f
;
Transform
.
=
0.0f
;
Transform
.
=
0.0f
;
Transform
.
=
1.0f
;
Transform
.
=
;
Transform
.
=
;
return
Transform
;
}
::
(
float
,
float
)
{
;
Transform
.
=
;
Transform
.
=
0.0f
;
Transform
.
=
0.0f
;
Transform
.
=
;
Transform
.
=
0.0f
;
Transform
.
=
0.0f
;
return
Transform
;
}
::
(
float
)
{
;
Transform
.
=(
)
(
);
Transform
.
= (
)
(
);
Transform
.
= (
)-
(
);
Transform
.
= (
)
(
);
Transform
.
=
0.0f
;
Transform
.
=
0.0f
;
return
Transform
;
}
::
(
float
,
float
)
{
;
Transform
.
=
;
Transform
.
=
;
Transform
.
=-
;
Transform
.
=
;
Transform
.
=
0.0f
;
Transform
.
=
0.0f
;
return
Transform
;
}
::
()
{
;
Transform
.
=
1.0f
;
Transform
.
=
0.0f
;
Transform
.
=
0.0f
;
Transform
.
=-
1.0f
;
Transform
.
=
0.0f
;
Transform
.
=
0.0f
;
return
Transform
;
}
::
()
{
;
Transform
.
=-
1.0f
;
Transform
.
=
0.0f
;
Transform
.
=
0.0f
;
Transform
.
=
1.0f
;
Transform
.
=
0.0f
;
Transform
.
=
0.0f
;
return
Transform
;
}
::
(
float
,
float
)
{
float
= (
)
(
*
+
*
);
float
=
/
Len
;
float
=
/
Len
;
return
(
Cos
, -
Sin
)
()
(
Cos
,
Sin
);
}
::
(
float
,
float
,
float
,
float
)
{
float
= (
)
(
*
+
*
);
float
=
/
Len
;
float
=
/
Len
;
return
(-
, -
)
(
Cos
, -
Sin
)
()
(
Cos
,
Sin
)
(
,
);
}
::
(
float
,
float
,
float
,
float
)
{
;
Transform
.
=
;
Transform
.
=
;
Transform
.
=
;
Transform
.
=
;
Transform
.
=
0.0f
;
Transform
.
=
0.0f
;
return
Transform
;
}
::
(
float
,
float
,
float
,
float
)
{
;
Transform
.
=(
)
(
)*
;
Transform
.
=(
)
(
)*
;
Transform
.
=(
)
(
)*
;
Transform
.
=(
)
(
)*
;
Transform
.
=
0.0f
;
Transform
.
=
0.0f
;
return
Transform
;
}
void
::
(
,
)
{
vint iWidthMM = GetDeviceCaps(hdcRef, HORZSIZE);
vint iHeightMM = GetDeviceCaps(hdcRef, VERTSIZE);
vint iWidthPels = GetDeviceCaps(hdcRef, HORZRES);
vint iHeightPels = GetDeviceCaps(hdcRef, VERTRES);
;
Rect
.
=
0
;
Rect
.
=
0
;
Rect
.
= (
int
)((
*
iWidthMM
*
100
)/
iWidthPels
);
Rect
.
= (
int
)((
*
iHeightMM
*
100
)/
iHeightPels
);
HDC Handle=CreateEnhMetaFile(NULL, NULL, &Rect, L"VczhLibrary++GDI\0Enhanced Meta File\0");
=
(
0
,
0
, &
Rect
,
L"VczhLibrary++GDI\0Enhanced Meta File\0"
);
->
(
Handle
);
=
;
=
;
}
void
::
(
)
{
;
Rect
.
=
0
;
Rect
.
=
0
;
Rect
.
=(
int
)
;
Rect
.
=(
int
)
;
(
->
(),
, &
Rect
);
}
void
::
()
{
(
(
->
()));
}
::
(
,
)
{
=
new
();
(
,
);
}
::
()
{
();
delete
;
}
void
::
(
*
)
{
();
(
->
(),
->
());
(
->
());
}
void
::
(
*
)
{
=
(
->
());
if
(
->
)
{
(
->
);
}
->
=
Handle
;
->
=
;
->
=
;
(
,
);
(
Handle
);
}
void
::
(
)
{
(
);
();
(
File
.
(),
File
.
());
(
File
.
());
}
void
::
(
)
{
=
(
->
());
HENHMETAFILE NewHandle=CopyEnhMetaFile(Handle, FileName.Buffer());
(
NewHandle
);
(
,
);
(
Handle
);
(
Handle
);
}
*
::
()
{
return
;
}
::
()
{
return
;
}
::
()
{
return
;
}
::
(
)
{
FHandle=GetEnhMetaFile(FileName.Buffer());
;
(
,
sizeof
(
Header
), &
Header
);
=(
Header
.
.
-
Header
.
.
)*
Header
.
.
/(
Header
.
.
*
100
);
=(
Header
.
.
-
Header
.
.
)*
Header
.
.
/(
Header
.
.
*
100
);
}
::
(
*
)
{
->
(
this
);
}
::
()
{
(
);
}
::
()
{
return
;
}
::
()
{
return
;
}
::
()
{
return
;
}
::
(
)
{
switch
(
)
{
case
:
return
32
;
case
:
return
24
;
default
:
return
1
;
}
}
::
(
,
)
{
=
(
);
=
*
Bits
;
=
sizeof
(
)*
8
;
LineBits
+=(
AlignBits
-
LineBits
%
AlignBits
)%
AlignBits
;
return
LineBits
/
8
;
}
void
::(
,
,
,
* )
{
->
=
sizeof
(
);
->
=(
int
)
;
->
=-(
int
)
;
->
=
1
;
->
=(
int
)
(
);
Header->biCompression=BI_RGB;
->
=
0
;
->
=
0
;
->
=
0
;
->
=(
==
?
2
:
0
);
->
=
0
;
}
::
(
,
,
)
{
if
(
==
)
{
return CreateBitmap((int)Width, (int)Height, 2, (int)GetBitsFromBB(Bits), NULL);
return
((
int
)
, (
int
)
,
2
, (
int
)
(
),
0
);
}
else
{
(
1
,
1
,
,
true
);
return
(
Bitmap
.
()->
(), (
int
)
, (
int
)
);
}
}
::
(
,
,
,
**&
)
{
*
=(
*)
(
sizeof
(
)+
2
*
sizeof
(
));
(
,
,
, &
Info
->
);
Info
->
[
0
].
=
0
;
Info
->
[
0
].
=
0
;
Info
->
[
0
].
=
0
;
Info
->
[
0
].
=
0
;
Info
->
[
1
].
=
255
;
Info
->
[
1
].
=
255
;
Info
->
[
1
].
=
255
;
Info
->
[
1
].
=
255
;
*
=
0
;
HBITMAP Handle=CreateDIBSection(FDC->GetHandle(), Info, DIB_RGB_COLORS, (void**)&FirstLine, NULL, 0);
=
(
->
(),
Info
,
0
, (
void
**)&
FirstLine
,
0
,
0
);
=
new
*[
];
=
(
,
);
for
(
=
0
;
i
<
;
i
++)
{
[
i
]=
FirstLine
+
LineBytes
*
i
;
}
(
Info
);
return
Handle
;
}
void
::
(
,
,
,
bool
)
{
=
new
();
if
(
)
{
=
(
,
,
,
);
}
else
{
=
(
,
,
);
=
0
;
}
=
;
=
;
=
;
=
false
;
=
(
->
(),
);
if
(
Object
)
{
(
Object
);
}
}
::
(
,
,
,
bool
)
{
(
,
,
,
);
}
::
(
,
bool
,
bool
)
{
=
?
:
;
HBITMAP TempBmp=(HBITMAP)LoadImage(NULL, FileName.Buffer(), IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
=(
)
(
0
,
.
(),
0
,
0
,
0
,
0x00000010
);
HDC TempDC=CreateCompatibleDC(NULL);
;
GetObject(TempBmp, sizeof(BITMAP), &TempRec);
(
TempBmp
,
sizeof
(
), &
TempRec
);
(
(
TempDC
,
TempBmp
));
(
TempRec
.
,
TempRec
.
,
,
);
BitBlt(FDC->GetHandle(), 0, 0, TempRec.bmWidth, TempRec.bmHeight, TempDC, 0, 0, SRCCOPY);
(
->
(),
0
,
0
,
TempRec
.
,
TempRec
.
,
TempDC
,
0
,
0
, (
)
0x00CC0020
);
(
TempDC
);
(
TempBmp
);
}
::
()
{
if
(
)
{
delete
[]
;
}
if
(
)
{
(
);
}
delete
;
}
void
::
(
stream
::
&
,
bool
)
{
if
(
)
{
;
;
if
(!
)
{
Header1
.
=
'M'
*
256
+
'B'
;
Header1
.
= (
int
)(
sizeof
(
Header1
) +
sizeof
(
Header2
) +
()*
);
Header1
.
=
0
;
Header1
.
=
0
;
Header1
.
=
sizeof
(
Header2
) +
sizeof
(
Header1
);
.
(&
Header1
,
sizeof
(
Header1
));
}
{
(&
Header2
,
0
,
sizeof
(
Header2
));
Header2
.
=
sizeof
(
Header2
);
Header2
.
= (
int
)
;
Header2
.
= -(
int
)
;
Header2
.
=
1
;
Header2
.
= (
int
)
(
);
Header2.bV5Compression = BI_RGB;
Header2.bV5CSType = LCS_sRGB;
Header2.bV5Intent = LCS_GM_GRAPHICS;
.
(&
Header2
,
sizeof
(
Header2
));
}
for
(
=
0
;
i
<
;
i
++)
{
.
(
[
i
],
());
}
}
else
{
(
,
,
,
true
);
Temp
.
()->
(
0
,
0
,
,
,
,
0
,
0
);
Temp
.
(
,
false
);
}
}
void
::
(
)
{
stream
::
(
,
stream
::
::
);
(
Output
,
false
);
}
*
::
()
{
return
;
}
::
()
{
return
;
}
::
()
{
return
;
}
::
()
{
return
(
,
);
}
**
::
()
{
return
;
}
::
()
{
return
;
}
::
::
()
{
return
;
}
void
::(
* )
{
(
,
,
,
);
}
bool
::
()
{
return
!=
0
&&
==
;
}
bool
::
()
{
return
;
}
void
::
(
bool
)
{
if
(
() && !
)
{
=
true
;
if
(
)
{
for
(
=
0
;
i
<
;
i
++)
{
*
=
[
i
];
=
;
while
(
j
--)
{
=
Colors
[
3
];
Colors
[
0
]=
Colors
[
0
]*
Alpha
/
255
;
Colors
[
1
]=
Colors
[
1
]*
Alpha
/
255
;
Colors
[
2
]=
Colors
[
2
]*
Alpha
/
255
;
Colors
+=
4
;
}
}
}
}
}
void
::
(
)
{
if
(
() && !
)
{
for
(
=
0
;
i
<
;
i
++)
{
*
=(
*)
[
i
];
=
;
while
(
j
--)
{
=*
Colors
&
0x00FFFFFF
;
*
Colors
=
Dest
| (
0xFF000000
* (
Dest
!=
));
Colors
++;
}
}
}
}
void
::
(
)
{
if
(
() && !
)
{
for
(
=
0
;
i
<
;
i
++)
{
*
=
[
i
];
=
;
while
(
j
--)
{
Colors
[
3
]=
;
Colors
+=
4
;
}
}
}
}
void
::
(
,
)
{
if
(
() && !
)
{
=
<<
24
;
for
(
=
0
;
i
<
;
i
++)
{
*
=(
*)
[
i
];
=
;
while
(
j
--)
{
=*
Colors
&
0x00FFFFFF
;
*
Colors
=
Dest
| (
A
* (
Dest
!=
));
Colors
++;
}
}
}
}
void
::
()
{
if
(
() && !
)
{
for
(
=
0
;
i
<
;
i
++)
{
*
=(
*)
[
i
];
=
;
while
(
j
--)
{
=*
Colors
&
0x00FFFFFF
;
*Colors = Dest | ((GetRValue(Dest)*77 + GetGValue(Dest)*151 + GetBValue(Dest)*28) & 0x0000FF00)<<16;
*
Colors
=
Dest
| (((((
)(((
)(
Dest
)) &
0xff
)))*
77
+ (((
)(((
)(((
)(
Dest
)) >>
8
)) &
0xff
)))*
151
+ (((
)(((
)((
Dest
)>>
16
)) &
0xff
)))*
28
) &
0x0000FF00
)<<
16
;
Colors
++;
}
}
}
}
void
::
()
{
if
(
() && !
)
{
for
(
=
0
;
i
<
;
i
++)
{
*
=(
*)
[
i
];
=
;
while
(
j
--)
{
=*
Colors
&
0x00FFFFFF
;
*Colors = Dest | ((GetRValue(Dest)+GetGValue(Dest)+GetBValue(Dest))/3)<<24;
*
Colors
=
Dest
| (((((
)(((
)(
Dest
)) &
0xff
)))+(((
)(((
)(((
)(
Dest
)) >>
8
)) &
0xff
)))+(((
)(((
)((
Dest
)>>
16
)) &
0xff
))))/
3
)<<
24
;
Colors
++;
}
}
}
}
void
::
(
(*
)(
))
{
if
(
() && !
)
{
for
(
=
0
;
i
<
;
i
++)
{
*
=(
*)
[
i
];
=
;
while
(
j
--)
{
= *
Colors
&
0x00FFFFFF
;
*
Colors
=
Dest
|
(
Dest
)<<
24
;
Colors
++;
}
}
}
}
::
()
{
=
0
;
;
lb
.
=
0
;
lb
.
=
0
;
=
(&
lb
);
}
::
(
)
{
=
0
;
=
(
);
}
::
(
,
)
{
=
0
;
=
((
int
)
,
);
}
::
(
::
)
{
(
(),
(),
::
,
true
);
Temp
.
()->
(
0
,
0
,
);
=
sizeof
(
);
=
new
unsigned
char
[
HeaderSize
+
Temp
.
()*
Temp
.
()];
Temp
.
((
*)
);
(
+
HeaderSize
,
Temp
.
()[
0
],
Temp
.
()*
Temp
.
());
FHandle=CreateDIBPatternBrushPt(FDIBMemory, DIB_RGB_COLORS);
=
();
}
::
()
{
(
);
if
(
)
{
delete
[]
;
}
}
::
()
{
return
;
}
::
(
,
,
)
{
=
0
;
=
((
int
)
, (
int
)
, (
int
)
);
}
::
(
,
,
,
,
,
,
const
*
)
{
=
0
;
;
Brush
.
=
;
Brush
.
=
0
;
FHandle=ExtCreatePen((int)(PS_GEOMETRIC|Style|EndCap|Join), (int)Width, &Brush, styleCount, styleArray);
=
((
int
)(
0x00010000
|
|
|
), (
int
)
, &
Brush
,
,
);
}
::
(
,
,
,
,
,
)
{
=
0
;
;
Brush
.
=
;
Brush.lbStyle=BS_HATCHED;
Brush
.
=
;
FHandle=ExtCreatePen((int)(PS_GEOMETRIC|Style|EndCap|Join), (int)Width, &Brush, NULL, NULL);
=
((
int
)(
0x00010000
|
|
|
), (
int
)
, &
Brush
,
0
,
0
);
}
::
(
::
,
,
,
,
)
{
(
(),
(),
::
,
true
);
Temp
.
()->
(
0
,
0
,
);
=
sizeof
(
);
=
new
unsigned
char
[
HeaderSize
+
Temp
.
()*
Temp
.
()];
Temp
.
((
*)
);
(
+
HeaderSize
,
Temp
.
()[
0
],
Temp
.
()*
Temp
.
());
;
Brush.lbColor=RGB(0, 0, 0);
Brush
.
=((
)(((
)(
0
)|((
)((
)(
0
))<<
8
))|(((
)(
)(
0
))<<
16
)));
Brush.lbStyle=BS_DIBPATTERNPT;
Brush
.
=(
)
;
FHandle=ExtCreatePen((int)(PS_GEOMETRIC|Style|EndCap|Join), (int)Width, &Brush, NULL, NULL);
=
((
int
)(
0x00010000
|
|
|
), (
int
)
, &
Brush
,
0
,
0
);
}
::
()
{
(
);
if
(
)
{
delete
[]
;
}
}
::
()
{
return
;
}
::
(
,
,
,
,
,
,
bool
,
bool
,
bool
,
bool
)
{
.
=(
int
)
;
.
=(
int
)
;
.
=(
int
)
;
.
=(
int
)
;
.
=(
int
)
;
FFontInfo.lfItalic=Italic?TRUE:FALSE;
FFontInfo.lfUnderline=Underline?TRUE:FALSE;
FFontInfo.lfStrikeOut=StrikeOut?TRUE:FALSE;
FFontInfo.lfCharSet=DEFAULT_CHARSET;
FFontInfo.lfOutPrecision=OUT_DEFAULT_PRECIS;
FFontInfo.lfClipPrecision=CLIP_DEFAULT_PRECIS;
FFontInfo.lfQuality=Antialise?CLEARTYPE_QUALITY:NONANTIALIASED_QUALITY;
FFontInfo.lfPitchAndFamily=DEFAULT_PITCH | FF_DONTCARE;
wcsncpy_s(FFontInfo.lfFaceName, sizeof(FFontInfo.lfFaceName)/sizeof(*FFontInfo.lfFaceName), Name.Buffer(), LF_FACESIZE-1);
(
.
,
sizeof
(
.
)/
sizeof
(*
.
),
.
(),
32
-
1
);
FHandle=CreateFontIndirect(&FFontInfo);
}
::
(
*
)
{
*
;
FHandle=CreateFontIndirect(&FFontInfo);
}
::
()
{
(
);
}
::
()
{
return
;
}
*
::
()
{
return
&
;
}
::
()
{
return new WinBrush(RGB(255, 255, 255));
return
new
(((
)(((
)(
255
)|((
)((
)(
255
))<<
8
))|(((
)(
)(
255
))<<
16
))));
}
::
()
{
return new WinPen(PS_SOLID, 0, RGB(0, 0, 0));
return
new
(
0
,
0
, ((
)(((
)(
0
)|((
)((
)(
0
))<<
8
))|(((
)(
)(
0
))<<
16
))));
}
::
()
{
;
NonClientMetrics
.
=
sizeof
(
);
SystemParametersInfo(SPI_GETNONCLIENTMETRICS, NonClientMetrics.cbSize, &NonClientMetrics, 0);
(
0x0029
,
NonClientMetrics
.
, &
NonClientMetrics
,
0
);
if
(!*
NonClientMetrics
.
.
)
{
NonClientMetrics
.
=
sizeof
(
)-
sizeof
(
NonClientMetrics
.
);
SystemParametersInfo(SPI_GETNONCLIENTMETRICS, NonClientMetrics.cbSize, &NonClientMetrics, 0);
(
0x0029
,
NonClientMetrics
.
, &
NonClientMetrics
,
0
);
}
return
new
(&
NonClientMetrics
.
);
}
class
:
public
,
public
{
public
:
static
*
;
::
()
{
return
();
}
::
()
{
return
();
}
::
()
{
return
();
}
}
;
*
::
=&
_DRS
;
*
GetDefaultResourceService
()
{
return
::
;
}
void
SetDefaultResourceService
(
*
)
{
::
=
;
}
void
::
()
{
GetDefaultResourceService
()->
();
=(
)
(
,
());
GetDefaultResourceService
()->
();
=(
)
(
,
());
GetDefaultResourceService
()->
();
=(
)
(
,
());
SetGraphicsMode(FHandle, GM_ADVANCED);
}
::
()
{
=
0
;
=
0
;
=
0
;
=
0
;
}
::
()
{
(
,
);
(
,
);
(
,
);
}
::
()
{
return
;
}
::
::
()
{
return
;
}
::
::
()
{
return
;
}
::
::
()
{
return
;
}
void
::
(
::
)
{
(
,
());
;
}
void
::
(
::
)
{
(
,
());
;
}
void
::
(
::
)
{
(
,
());
;
}
::
()
{
return
(
);
}
void
::
(
)
{
(
,
);
}
::
()
{
return
::
(
);
}
void
::
(
)
{
::
(
,
);
}
bool
::
()
{
return GetBkMode(FHandle)==TRANSPARENT;
}
void
::
(
bool
)
{
SetBkMode(FHandle, Transparent?TRANSPARENT:OPAQUE);
}
::
()
{
;
(
, &
Point
);
return
Point
;
}
void
::
(
)
{
SetBrushOrgEx(FHandle, Point.x, Point.y, NULL);
}
int
::
(
int
)
{
return
(
,
);
}
void
::
(
,
,
const
wchar_t
*
,
)
{
TextOut(FHandle, (int)X, (int)Y, Text, (int)CharCount);
(
, (
int
)
, (
int
)
,
, (
int
)
);
}
void
::
(
,
,
const
wchar_t
*
,
,
,
)
{
int
=(
int
)
;
TabbedTextOut(FHandle, (int)X, (int)Y, Text, (int)CharCount, 1, &realTabWidth, (int)TabOriginX);
(
, (
int
)
, (
int
)
,
, (
int
)
,
1
, &
realTabWidth
, (
int
)
);
}
void
::
(
,
const
wchar_t
*
,
,
)
{
DrawText(FHandle, Text, (int)CharCount, &Rect, Format);
}
void
::
(
,
,
)
{
(
,
,
.
(),
.
());
}
void
::
(
,
,
,
,
)
{
(
,
,
.
(),
.
(),
,
);
}
void
::
(
,
,
)
{
(
,
.
(),
.
(),
);
}
::
(
,
)
{
return
(
.
(),
.
(),
);
}
::
(
const
wchar_t
*
,
,
)
{
;
if
(
==-
1
)
{
GetTextExtentPoint32(FHandle, Text, (int)CharCount, &Size);
}
else
{
int
=(
int
)
;
DWORD Result=GetTabbedTextExtent(FHandle, Text, (int)CharCount, 1, &realTabSize);
=
(
,
, (
int
)
,
1
, &
realTabSize
);
Size.cx=LOWORD(Result);
Size
.
=((
)(((
)(
Result
)) &
0xffff
));
Size.cy=HIWORD(Result);
Size
.
=((
)((((
)(
Result
)) >>
16
) &
0xffff
));
}
return
Size
;
}
::
(
const
wchar_t
*
,
)
{
return
(
,
(
),
);
}
::
(
,
)
{
return
(
.
(),
.
(),
);
}
::
(
const
wchar_t
*
,
,
)
{
= {
0
};
=
0
;
const
wchar_t
*
=
;
*
=
new
[
];
while
(*
reading
)
{
=
0
;
GetTextExtentExPoint(FHandle, reading, (int)(CharCount-(reading-Text)), (int)MaxWidth, &fit, dx, &size);
(
,
reading
, (
int
)(
-(
reading
-
)), (
int
)
, &
fit
,
dx
, &
size
);
reading
+=
fit
;
lineCount
++;
}
delete
dx
;
size
.
=
0
;
size
.
*=(
int
)
lineCount
;
return
size
;
}
::
(
const
wchar_t
*
,
)
{
return
(
,
(
),
);
}
void
::
(
::
)
{
(
,
(),
());
}
void
::
(
::
,
,
)
{
(
,
(),
(), (
int
)
, (
int
)
);
}
void
::
(
,
)
{
::MoveToEx(FHandle, (int)X, (int)Y, NULL);
}
void
::
(
,
)
{
::
(
, (
int
)
, (
int
)
);
}
void
::
(
,
,
,
)
{
::
(
, (
int
)
, (
int
)
, (
int
)
, (
int
)
);
}
void
::
(
)
{
::
(
,
.
,
.
,
.
,
.
);
}
void
::
(
,
,
,
)
{
;
Rect
.
=(
int
)
;
Rect
.
=(
int
)
;
Rect
.
=(
int
)
;
Rect
.
=(
int
)
;
::
(
, &
Rect
);
}
void
::
(
)
{
::
(
, &
);
}
void
::
(
,
,
,
)
{
;
Rect
.
=(
int
)
;
Rect
.
=(
int
)
;
Rect
.
=(
int
)
;
Rect
.
=(
int
)
;
::
(
, &
Rect
,
());
}
void
::
(
)
{
::
(
, &
,
());
}
void
::
(
,
,
,
)
{
::
(
, (
int
)
, (
int
)
, (
int
)
, (
int
)
);
}
void
::
(
)
{
::
(
,
.
,
.
,
.
,
.
);
}
void
::
(
,
,
,
,
,
)
{
::
(
, (
int
)
, (
int
)
, (
int
)
, (
int
)
, (
int
)
, (
int
)
);
}
void
::
(
,
,
)
{
::
(
, (
int
)
.
, (
int
)
.
, (
int
)
.
, (
int
)
.
, (
int
)
, (
int
)
);
}
void
::
(
const
*
,
)
{
::
(
,
, (
int
)
);
}
void
::
(
const
*
,
)
{
::
(
,
, (
int
)
);
}
void
::
(
const
*
,
)
{
::
(
,
, (
int
)
);
}
void
::
(
const
*
,
)
{
::
(
,
, (
int
)
);
}
void
::
(
const
*
,
)
{
::
(
,
, (
int
)
);
}
void
::
(
const
*
,
const
*
,
)
{
::
(
,
,
, (
int
)
);
}
void
::
(
,
,
)
{
::
(
,
.
,
.
,
.
,
.
,
.
,
.
,
.
,
.
);
}
void
::
(
,
,
,
,
,
,
,
)
{
::
(
, (
int
)
, (
int
)
, (
int
)
, (
int
)
, (
int
)
, (
int
)
, (
int
)
, (
int
)
);
}
void
::
(
,
,
)
{
::
(
, (
int
)
.
, (
int
)
.
, (
int
)
.
, (
int
)
.
, (
int
)
.
, (
int
)
.
, (
int
)
.
, (
int
)
.
);
}
void
::
(
,
,
,
,
,
,
,
)
{
::
(
, (
int
)
, (
int
)
, (
int
)
, (
int
)
, (
int
)
, (
int
)
, (
int
)
, (
int
)
);
}
void
::
(
,
,
,
float
,
float
)
{
::
(
, (
int
)
, (
int
)
, (
int
)
,
,
);
}
void
::
(
,
,
,
double
,
double
)
{
::
(
, (
int
)
, (
int
)
, (
int
)
, (
float
)
, (
float
)
);
}
void
::
(
,
,
)
{
::
(
, (
int
)
.
, (
int
)
.
, (
int
)
.
, (
int
)
.
, (
int
)
.
, (
int
)
.
, (
int
)
.
, (
int
)
.
);
}
void
::
(
,
,
,
,
,
,
,
)
{
::
(
, (
int
)
, (
int
)
, (
int
)
, (
int
)
, (
int
)
, (
int
)
, (
int
)
, (
int
)
);
}
void
::
(
,
,
)
{
::
(
, (
int
)
.
, (
int
)
.
, (
int
)
.
, (
int
)
.
, (
int
)
.
, (
int
)
.
, (
int
)
.
, (
int
)
.
);
}
void
::
(
,
,
,
,
,
,
,
)
{
::
(
, (
int
)
, (
int
)
, (
int
)
, (
int
)
, (
int
)
, (
int
)
, (
int
)
, (
int
)
);
}
void
::
(
*
,
,
*
,
)
{
GradientFill(FHandle, Vertices, (int)VerticesCount, Rectangles, (int)RectangleCount, GRADIENT_FILL_RECT_H);
(
,
, (
int
)
,
, (
int
)
,
0x00000000
);
}
void
::
(
*
,
,
*
,
)
{
GradientFill(FHandle, Vertices, (int)VerticesCount, Rectangles, (int)RectangleCount, GRADIENT_FILL_RECT_V);
(
,
, (
int
)
,
, (
int
)
,
0x00000001
);
}
void
::
(
*
,
,
*
,
)
{
GradientFill(FHandle, Vertices, (int)VerticesCount, Triangles, (int)TriangleCount, GRADIENT_FILL_TRIANGLE);
(
,
, (
int
)
,
, (
int
)
,
0x00000002
);
}
void
::
()
{
::
(
);
}
void
::
()
{
::
(
);
}
void
::
()
{
::
(
);
}
void
::
()
{
::
(
);
}
void
::
()
{
::
(
);
}
void
::
()
{
::
(
);
}
void
::
()
{
::
(
);
}
void
::
()
{
::
(
);
}
::
::
()
{
return
new
(::
(
));
}
bool
::
(
)
{
return PtVisible(FHandle, Point.x, Point.y)==TRUE;
}
bool
::
(
)
{
return RectVisible(FHandle, &Rect)==TRUE;
}
void
::
(
)
{
(
, (
int
)
);
}
void
::
(
::
)
{
(
,
());
}
void
::
()
{
SelectClipRgn(FHandle, NULL);
}
void
::
(
,
)
{
(
, (
int
)
, (
int
)
);
}
void
::
(
::
,
)
{
(
,
(), (
int
)
);
}
void
::
(
)
{
::
(
,
.
,
.
,
.
,
.
);
}
void
::
(
)
{
::
(
,
.
,
.
,
.
,
.
);
}
::
::
()
{
=
(
0
,
0
,
1
,
1
);
(
,
Handle
);
return
new
(
Handle
);
}
::
()
{
;
(
, &
Rect
);
return
Rect
;
}
::
()
{
;
(
, &
Transform
);
return
Transform
;
}
void
::
(
const
&
)
{
(
,
.
());
}
void
::
(
,
,
,
,
*
,
,
,
)
{
=
?
->
():
0
;
(
, (
int
)
, (
int
)
, (
int
)
, (
int
)
,
SourceHandle
, (
int
)
, (
int
)
, (
int
)
);
}
void
::
(
,
*
,
,
)
{
=
?
->
():
0
;
(
,
.
,
.
,
.
-
.
,
.
-
.
,
SourceHandle
,
.
,
.
,
);
}
void
::
(
,
,
,
,
*
,
,
,
,
,
)
{
=
?
->
():
0
;
(
, (
int
)
, (
int
)
, (
int
)
, (
int
)
,
SourceHandle
, (
int
)
, (
int
)
, (
int
)
, (
int
)
, (
int
)
);
}
void
::
(
,
*
,
,
)
{
=
?
->
():
0
;
(
,
.
,
.
,
.
-
.
,
.
-
.
,
SourceHandle
,
.
,
.
,
.
-
.
,
.
-
.
,
);
}
void
::
(
,
,
,
*
,
,
,
,
)
{
[
3
];
Pt
[
0
]
;
Pt
[
1
]
;
Pt
[
2
]
;
(
,
Pt
,
->
(), (
int
)
, (
int
)
, (
int
)
, (
int
)
,
0
,
0
,
0
);
}
void
::
(
,
,
,
*
,
)
{
[
3
];
Pt
[
0
]
;
Pt
[
1
]
;
Pt
[
2
]
;
(
,
Pt
,
->
(),
.
,
.
,
.
-
.
,
.
-
.
,
0
,
0
,
0
);
}
void
::
(
,
,
,
,
*
,
,
,
,
,
)
{
(
, (
int
)
, (
int
)
, (
int
)
, (
int
)
,
->
(), (
int
)
, (
int
)
, (
int
)
, (
int
)
,
);
}
void
::
(
,
*
,
,
)
{
(
,
.
,
.
,
.
-
.
,
.
-
.
,
->
() ,
.
,
.
,
.
-
.
,
.
-
.
,
);
}
void
::
(
,
,
*
)
{
(
,
,
->
(),
->
(),
);
}
void
::
(
,
*
)
{
(
.
,
.
,
->
(),
->
(),
);
}
void
::
(
,
,
,
,
*
)
{
;
Rect
.
=(
int
)
;
Rect
.
=(
int
)
;
Rect
.
=(
int
)(
+
);
Rect
.
=(
int
)(
+
);
(
Rect
,
);
}
void
::
(
,
*
)
{
(
,
->
(), &
);
}
void
::
(
,
,
::
)
{
=
();
=
();
=
0
;
=
0
;
if
(!
())
{
BitBlt(FHandle, (int)dstX, (int)dstY, (int)dstW, (int)dstH, Bitmap->GetWinDC()->GetHandle(), (int)srcX, (int)srcY, SRCCOPY);
(
, (
int
)
, (
int
)
, (
int
)
dstW
, (
int
)
dstH
,
()->
(), (
int
)
srcX
, (
int
)
srcY
, (
)
0x00CC0020
);
}
else
{
=
dstW
;
=
dstH
;
;
Blend.BlendOp=AC_SRC_OVER;
Blend
.
=
0
;
Blend
.
=
255
;
Blend.AlphaFormat=AC_SRC_ALPHA;
(
, (
int
)
, (
int
)
, (
int
)
dstW
, (
int
)
dstH
,
()->
(), (
int
)
srcX
, (
int
)
srcY
, (
int
)
srcW
, (
int
)
srcH
,
Blend
);
}
}
void
::
(
,
::
)
{
=
.
;
=
.
;
=
();
=
();
=
0
;
=
0
;
if
(!
())
{
BitBlt(FHandle, (int)dstX, (int)dstY, (int)dstW, (int)dstH, Bitmap->GetWinDC()->GetHandle(), (int)srcX, (int)srcY, SRCCOPY);
(
, (
int
)
dstX
, (
int
)
dstY
, (
int
)
dstW
, (
int
)
dstH
,
()->
(), (
int
)
srcX
, (
int
)
srcY
, (
)
0x00CC0020
);
}
else
{
=
dstW
;
=
dstH
;
;
Blend.BlendOp=AC_SRC_OVER;
Blend
.
=
0
;
Blend
.
=
255
;
Blend.AlphaFormat=AC_SRC_ALPHA;
(
, (
int
)
dstX
, (
int
)
dstY
, (
int
)
dstW
, (
int
)
dstH
,
()->
(), (
int
)
srcX
, (
int
)
srcY
, (
int
)
srcW
, (
int
)
srcH
,
Blend
);
}
}
void
::
(
,
,
,
,
::
)
{
=
0
;
=
0
;
=
();
=
();
if
(!
())
{
StretchBlt(FHandle, (int)dstX, (int)dstY, (int)dstW, (int)dstH, Bitmap->GetWinDC()->GetHandle(), (int)srcX, (int)srcY, (int)srcW, (int)srcH, SRCCOPY);
(
, (
int
)
, (
int
)
, (
int
)
, (
int
)
,
()->
(), (
int
)
srcX
, (
int
)
srcY
, (
int
)
srcW
, (
int
)
srcH
, (
)
0x00CC0020
);
}
else
{
;
Blend.BlendOp=AC_SRC_OVER;
Blend
.
=
0
;
Blend
.
=
255
;
Blend.AlphaFormat=AC_SRC_ALPHA;
(
, (
int
)
, (
int
)
, (
int
)
, (
int
)
,
()->
(), (
int
)
srcX
, (
int
)
srcY
, (
int
)
srcW
, (
int
)
srcH
,
Blend
);
}
}
void
::
(
,
::
)
{
=
.
;
=
.
;
=
.
-
.
;
=
.
-
.
;
=
0
;
=
0
;
=
();
=
();
if
(!
())
{
StretchBlt(FHandle, (int)dstX, (int)dstY, (int)dstW, (int)dstH, Bitmap->GetWinDC()->GetHandle(), (int)srcX, (int)srcY, (int)srcW, (int)srcH, SRCCOPY);
(
, (
int
)
dstX
, (
int
)
dstY
, (
int
)
dstW
, (
int
)
dstH
,
()->
(), (
int
)
srcX
, (
int
)
srcY
, (
int
)
srcW
, (
int
)
srcH
, (
)
0x00CC0020
);
}
else
{
;
Blend.BlendOp=AC_SRC_OVER;
Blend
.
=
0
;
Blend
.
=
255
;
Blend.AlphaFormat=AC_SRC_ALPHA;
(
, (
int
)
dstX
, (
int
)
dstY
, (
int
)
dstW
, (
int
)
dstH
,
()->
(), (
int
)
srcX
, (
int
)
srcY
, (
int
)
srcW
, (
int
)
srcH
,
Blend
);
}
}
void
::
(
,
,
,
,
::
,
,
)
{
if
(!
())
{
BitBlt(FHandle, (int)dstX, (int)dstY, (int)dstW, (int)dstH, Bitmap->GetWinDC()->GetHandle(), (int)srcX, (int)srcY, SRCCOPY);
(
, (
int
)
, (
int
)
, (
int
)
, (
int
)
,
()->
(), (
int
)
, (
int
)
, (
)
0x00CC0020
);
}
else
{
=
;
=
;
;
Blend.BlendOp=AC_SRC_OVER;
Blend
.
=
0
;
Blend
.
=
255
;
Blend.AlphaFormat=AC_SRC_ALPHA;
(
, (
int
)
, (
int
)
, (
int
)
, (
int
)
,
()->
(), (
int
)
, (
int
)
, (
int
)
srcW
, (
int
)
srcH
,
Blend
);
}
}
void
::
(
,
::
,
)
{
=
.
;
=
.
;
=
.
-
.
;
=
.
-
.
;
=
.
;
=
.
;
if
(!
())
{
BitBlt(FHandle, (int)dstX, (int)dstY, (int)dstW, (int)dstH, Bitmap->GetWinDC()->GetHandle(), (int)srcX, (int)srcY, SRCCOPY);
(
, (
int
)
dstX
, (
int
)
dstY
, (
int
)
dstW
, (
int
)
dstH
,
()->
(), (
int
)
srcX
, (
int
)
srcY
, (
)
0x00CC0020
);
}
else
{
=
dstW
;
=
dstH
;
;
Blend.BlendOp=AC_SRC_OVER;
Blend
.
=
0
;
Blend
.
=
255
;
Blend.AlphaFormat=AC_SRC_ALPHA;
(
, (
int
)
dstX
, (
int
)
dstY
, (
int
)
dstW
, (
int
)
dstH
,
()->
(), (
int
)
srcX
, (
int
)
srcY
, (
int
)
srcW
, (
int
)
srcH
,
Blend
);
}
}
void
::
(
,
,
,
,
::
,
,
,
,
)
{
if
(!
())
{
StretchBlt(FHandle, (int)dstX, (int)dstY, (int)dstW, (int)dstH, Bitmap->GetWinDC()->GetHandle(), (int)srcX, (int)srcY, (int)srcW, (int)srcH, SRCCOPY);
(
, (
int
)
, (
int
)
, (
int
)
, (
int
)
,
()->
(), (
int
)
, (
int
)
, (
int
)
, (
int
)
, (
)
0x00CC0020
);
}
else
{
;
Blend.BlendOp=AC_SRC_OVER;
Blend
.
=
0
;
Blend
.
=
255
;
Blend.AlphaFormat=AC_SRC_ALPHA;
(
, (
int
)
, (
int
)
, (
int
)
, (
int
)
,
()->
(), (
int
)
, (
int
)
, (
int
)
, (
int
)
,
Blend
);
}
}
void
::
(
,
::
,
)
{
=
.
;
=
.
;
=
.
-
.
;
=
.
-
.
;
=
.
;
=
.
;
=
.
-
.
;
=
.
-
.
;
if
(!
())
{
StretchBlt(FHandle, (int)dstX, (int)dstY, (int)dstW, (int)dstH, Bitmap->GetWinDC()->GetHandle(), (int)srcX, (int)srcY, (int)srcW, (int)srcH, SRCCOPY);
(
, (
int
)
dstX
, (
int
)
dstY
, (
int
)
dstW
, (
int
)
dstH
,
()->
(), (
int
)
srcX
, (
int
)
srcY
, (
int
)
srcW
, (
int
)
srcH
, (
)
0x00CC0020
);
}
else
{
;
Blend.BlendOp=AC_SRC_OVER;
Blend
.
=
0
;
Blend
.
=
255
;
Blend.AlphaFormat=AC_SRC_ALPHA;
(
, (
int
)
dstX
, (
int
)
dstY
, (
int
)
dstW
, (
int
)
dstH
,
()->
(), (
int
)
srcX
, (
int
)
srcY
, (
int
)
srcW
, (
int
)
srcH
,
Blend
);
}
}
void
::
(
,
,
::
,
unsigned
char
)
{
=
();
=
();
=
0
;
=
0
;
=
dstW
;
=
dstH
;
;
Blend.BlendOp=AC_SRC_OVER;
Blend
.
=
0
;
Blend
.
=
;
Blend.AlphaFormat=Bitmap->IsAlphaChannelBuilt()?AC_SRC_ALPHA:0;
(
, (
int
)
, (
int
)
, (
int
)
dstW
, (
int
)
dstH
,
()->
(), (
int
)
srcX
, (
int
)
srcY
, (
int
)
srcW
, (
int
)
srcH
,
Blend
);
}
void
::
(
,
::
,
unsigned
char
)
{
=
.
;
=
.
;
=
();
=
();
=
0
;
=
0
;
=
dstW
;
=
dstH
;
;
Blend.BlendOp=AC_SRC_OVER;
Blend
.
=
0
;
Blend
.
=
;
Blend.AlphaFormat=Bitmap->IsAlphaChannelBuilt()?AC_SRC_ALPHA:0;
(
, (
int
)
dstX
, (
int
)
dstY
, (
int
)
dstW
, (
int
)
dstH
,
()->
(), (
int
)
srcX
, (
int
)
srcY
, (
int
)
srcW
, (
int
)
srcH
,
Blend
);
}
void
::
(
,
,
,
,
::
,
unsigned
char
)
{
=
0
;
=
0
;
=
();
=
();
;
Blend.BlendOp=AC_SRC_OVER;
Blend
.
=
0
;
Blend
.
=
;
Blend.AlphaFormat=Bitmap->IsAlphaChannelBuilt()?AC_SRC_ALPHA:0;
(
, (
int
)
, (
int
)
, (
int
)
, (
int
)
,
()->
(), (
int
)
srcX
, (
int
)
srcY
, (
int
)
srcW
, (
int
)
srcH
,
Blend
);
}
void
::
(
,
::
,
unsigned
char
)
{
=
.
;
=
.
;
=
.
-
.
;
=
.
-
.
;
=
0
;
=
0
;
=
();
=
();
;
Blend.BlendOp=AC_SRC_OVER;
Blend
.
=
0
;
Blend
.
=
;
Blend.AlphaFormat=Bitmap->IsAlphaChannelBuilt()?AC_SRC_ALPHA:0;
(
, (
int
)
dstX
, (
int
)
dstY
, (
int
)
dstW
, (
int
)
dstH
,
()->
(), (
int
)
srcX
, (
int
)
srcY
, (
int
)
srcW
, (
int
)
srcH
,
Blend
);
}
void
::
(
,
,
,
,
::
,
,
,
unsigned
char
)
{
=
;
=
;
;
Blend.BlendOp=AC_SRC_OVER;
Blend
.
=
0
;
Blend
.
=
;
Blend.AlphaFormat=Bitmap->IsAlphaChannelBuilt()?AC_SRC_ALPHA:0;
(
, (
int
)
, (
int
)
, (
int
)
, (
int
)
,
()->
(), (
int
)
, (
int
)
, (
int
)
srcW
, (
int
)
srcH
,
Blend
);
}
void
::
(
,
::
,
,
unsigned
char
)
{
=
.
;
=
.
;
=
.
-
.
;
=
.
-
.
;
=
.
;
=
.
;
=
dstW
;
=
dstH
;
;
Blend.BlendOp=AC_SRC_OVER;
Blend
.
=
0
;
Blend
.
=
;
Blend.AlphaFormat=Bitmap->IsAlphaChannelBuilt()?AC_SRC_ALPHA:0;
(
, (
int
)
dstX
, (
int
)
dstY
, (
int
)
dstW
, (
int
)
dstH
,
()->
(), (
int
)
srcX
, (
int
)
srcY
, (
int
)
srcW
, (
int
)
srcH
,
Blend
);
}
void
::
(
,
,
,
,
::
,
,
,
,
,
unsigned
char
)
{
;
Blend.BlendOp=AC_SRC_OVER;
Blend
.
=
0
;
Blend
.
=
;
Blend.AlphaFormat=Bitmap->IsAlphaChannelBuilt()?AC_SRC_ALPHA:0;
(
, (
int
)
, (
int
)
, (
int
)
, (
int
)
,
()->
(), (
int
)
, (
int
)
, (
int
)
, (
int
)
,
Blend
);
}
void
::
(
,
::
,
,
unsigned
char
)
{
=
.
;
=
.
;
=
.
-
.
;
=
.
-
.
;
=
.
;
=
.
;
=
.
-
.
;
=
.
-
.
;
;
Blend.BlendOp=AC_SRC_OVER;
Blend
.
=
0
;
Blend
.
=
;
Blend.AlphaFormat=Bitmap->IsAlphaChannelBuilt()?AC_SRC_ALPHA:0;
(
, (
int
)
dstX
, (
int
)
dstY
, (
int
)
dstW
, (
int
)
dstH
,
()->
(), (
int
)
srcX
, (
int
)
srcY
, (
int
)
srcW
, (
int
)
srcH
,
Blend
);
}
::
(
)
{
=
;
=
(
);
();
}
::
()
{
(
,
);
}
::
()
{
}
::
()
{
}
void
::
(
)
{
=
;
();
}
::
()
{
FHandle=CreateCompatibleDC(NULL);
();
}
::
()
{
(
);
}
}
}
}