unit _uc_hint_class;
interface
uses
SysUtils,classes,Windows,controls,graphics,forms;
type
TEXOSEE_SMART_HINT = class(THintWindow)
protected
procedure CreateParams(var Params: TCreateParams); override;
procedure Paint; override;
end;
var
HINT__LINES:TStringList;
implementation
uses unit1,_uc_refs_consts,_uc_refs_vars;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
procedure TEXOSEE_SMART_HINT.CreateParams(var Params: TCreateParams);
const
CS_DROPSHADOW = $00020000;
begin
inherited;
{ Enable drop shadow effect on Windows XP and later }
if (Win32Platform = VER_PLATFORM_WIN32_NT) and
((Win32MajorVersion > 5) or
((Win32MajorVersion = 5) and (Win32MinorVersion >= 1))) then
Params.WindowClass.Style := Params.WindowClass.Style or CS_DROPSHADOW;
end;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
procedure TEXOSEE_SMART_HINT.paint;
var
v,i,h,_count: integer;
rc:TRect;
s:string;
begin
if NOT(_HINT_ZUNDER_IZ_USER_LIST) then
begin
inherited Paint;
exit;
end;
_HINT_ZUNDER_IZ_USER_LIST:=false;
HINT__LINES.Text:=Caption;
_count:= HINT__LINES.Count;
v:=0;
h:=0;
rc:=GetClientRect;
Canvas.Brush.Color:=clInfoBk;
Canvas.FillRect(rc);
Canvas.Font.Name :='Tahoma';
Canvas.Font.Size :=8;
Canvas.Font.Color :=clInfoText;
Canvas.pen.Color :=$008B5A47;
Canvas.pen.Style :=psSolid;
inc(v,h);
Canvas.Brush.Style:=bsClear;
for i:=0 to _count-1 do
begin
s:=HINT__LINES[i];
Canvas.Font.Style:=[];
case i of
0 : begin
h:=12;
s:=HINT__LINES[i][1]; // logo
end;
1 : begin
h:=16;
Canvas.Font.Style:=[fsBold];
end;
2 : h:=8;
else h:=14;
end;
if (s='-') then
begin
Canvas.MoveTo(6,v+4);
Canvas.LineTo(width-8,v+4);
end
else if (i=0) then
begin
Canvas.Font.Name :='Webdings';
Canvas.Font.Size :=22;
Canvas.Font.Color :=$008B5A47;
Canvas.TextRect(rc,8,v,s);
Canvas.Font.Name :='Tahoma';
Canvas.Font.Size :=8;
Canvas.Font.Color :=clInfoText;
end
else
begin
if i=1 then Canvas.TextRect(rc,46,2+v,s)
else Canvas.TextRect(rc,8,2+v,s);
end;
if (i=_count-3) then inc(h,4);
if (i=_count-2) then begin
dec(h,6);
Canvas.Font.Color :=clBtnShadow;
end;
inc(v,h);
end;
end;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
initialization
HintWindowClass := TEXOSEE_SMART_HINT;
HINT__LINES := TStringList.Create;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
finalization
HINT__LINES.Free;
end.
interface
uses
SysUtils,classes,Windows,controls,graphics,forms;
type
TEXOSEE_SMART_HINT = class(THintWindow)
protected
procedure CreateParams(var Params: TCreateParams); override;
procedure Paint; override;
end;
var
HINT__LINES:TStringList;
implementation
uses unit1,_uc_refs_consts,_uc_refs_vars;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
procedure TEXOSEE_SMART_HINT.CreateParams(var Params: TCreateParams);
const
CS_DROPSHADOW = $00020000;
begin
inherited;
{ Enable drop shadow effect on Windows XP and later }
if (Win32Platform = VER_PLATFORM_WIN32_NT) and
((Win32MajorVersion > 5) or
((Win32MajorVersion = 5) and (Win32MinorVersion >= 1))) then
Params.WindowClass.Style := Params.WindowClass.Style or CS_DROPSHADOW;
end;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
procedure TEXOSEE_SMART_HINT.paint;
var
v,i,h,_count: integer;
rc:TRect;
s:string;
begin
if NOT(_HINT_ZUNDER_IZ_USER_LIST) then
begin
inherited Paint;
exit;
end;
_HINT_ZUNDER_IZ_USER_LIST:=false;
HINT__LINES.Text:=Caption;
_count:= HINT__LINES.Count;
v:=0;
h:=0;
rc:=GetClientRect;
Canvas.Brush.Color:=clInfoBk;
Canvas.FillRect(rc);
Canvas.Font.Name :='Tahoma';
Canvas.Font.Size :=8;
Canvas.Font.Color :=clInfoText;
Canvas.pen.Color :=$008B5A47;
Canvas.pen.Style :=psSolid;
inc(v,h);
Canvas.Brush.Style:=bsClear;
for i:=0 to _count-1 do
begin
s:=HINT__LINES[i];
Canvas.Font.Style:=[];
case i of
0 : begin
h:=12;
s:=HINT__LINES[i][1]; // logo
end;
1 : begin
h:=16;
Canvas.Font.Style:=[fsBold];
end;
2 : h:=8;
else h:=14;
end;
if (s='-') then
begin
Canvas.MoveTo(6,v+4);
Canvas.LineTo(width-8,v+4);
end
else if (i=0) then
begin
Canvas.Font.Name :='Webdings';
Canvas.Font.Size :=22;
Canvas.Font.Color :=$008B5A47;
Canvas.TextRect(rc,8,v,s);
Canvas.Font.Name :='Tahoma';
Canvas.Font.Size :=8;
Canvas.Font.Color :=clInfoText;
end
else
begin
if i=1 then Canvas.TextRect(rc,46,2+v,s)
else Canvas.TextRect(rc,8,2+v,s);
end;
if (i=_count-3) then inc(h,4);
if (i=_count-2) then begin
dec(h,6);
Canvas.Font.Color :=clBtnShadow;
end;
inc(v,h);
end;
end;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
initialization
HintWindowClass := TEXOSEE_SMART_HINT;
HINT__LINES := TStringList.Create;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
finalization
HINT__LINES.Free;
end.