uses Windows, sCommonData, acGlow;
procedure TForm2.sButton1Click(Sender: TObject);
begin
sButton1.Default := not sButton1.Default;
end;
procedure TForm2.Timer1Timer(Sender: TObject);
var
skd : TsCommonData;
R, RBox : TRect;
DC : hdc;
begin
skd := sButton1.SkinData;
if (sButton1.Default) then
begin
if skd.GlowID <> -1 then HideGlow(skd.GlowID);
if GetWindowRect(TWinControl(skd.FOwnerControl).Handle, R) then
begin
DC := GetWindowDC(TWinControl(skd.FOwnerControl).Handle);
if GetClipBox(DC, RBox) = 0 then Exit;
ReleaseDC(TWinControl(skd.FOwnerControl).Handle, DC);
skd.GlowID := ShowGlow(R, RBox, skd.SkinSection, 'GLOW', skd.SkinManager.gd[skd.SkinIndex].GlowMargin,
MaxByte, sButton1.Handle, skd);
end;
end else
begin
if (skd.GlowID <> -1) and not (skd.FMouseAbove) then
begin
HideGlow(skd.GlowID);
skd.GlowID := -1;
end;
end;
end;