File: sCommonData.pas  
122 122 {$IFNDEF NOTFORHELP}
123 123 var
124 124   C1, C2 : TsColor;
125 125   RestrictDrawing : boolean = False;
126 126  
127 127 function IsCached(SkinData : TsCommonData) : boolean;
128   function InUpdating(SkinData : TsCommonData; Reset : boolean = False) : boolean;
  128 function InUpdating(SkinData : TsCommonData; Reset : boolean) : boolean;
129 129 function IsCacheRequired(SkinData : TsCommonData) : integer;
130 130 procedure InitBGInfo(const SkinData : TsCommonData; const PBGInfo : PacBGInfo; const State : integer; Handle : THandle = 0);
131 131 function GetBGColor(const SkinData : TsCommonData; const State : integer; Handle : THandle = 0) : TColor;
132 132 function GetFontIndex(const Ctrl : TControl; const DefSkinIndex : integer; const SkinManager : TsSkinManager; State : integer = 0) : integer;
133 133 procedure ShowGlowingIfNeeded(const SkinData : TsCommonData; Clicked : boolean = False; CtrlHandle : HWND = 0);
134 134 function ParentTextured(const SkinData : TsCommonData) : boolean;
 
162 162  
163 163 function IsCached(SkinData : TsCommonData) : boolean;
164 164 begin
165 165   Result := (SkinData.CtrlSkinState and ACS_FAST <> ACS_FAST) or ControlIsActive(SkinData);
166 166 end;
167 167  
168   function InUpdating(SkinData : TsCommonData; Reset : boolean = False) : boolean;
  168 function InUpdating(SkinData : TsCommonData; Reset : boolean) : boolean;
169 169 begin
170 170   if Reset then SkinData.FUpdating := False;
171 171   if SkinData.Updating then begin
172 172     SkinData.FUpdating := True;
173 173     Result := False;
174 174   end
 
282 282     case iTransparency of
283 283       0 : begin
284 284         if (iGradient > 0) or (iTexture > 0) then begin
285 285           PBGInfo^.Color := SkinData.SkinManager.GetGlobalColor;
286 286           if (SkinData.FCacheBmp = nil) or SkinData.FCacheBmp.Empty then begin
287 287             PBGInfo^.BgType := btNotReady;//Fill;
  288             SkinData.FUpdating := True;
288 289             Exit;
289 290           end;
290 291           PBGInfo^.BgType := btCache;
291 292           if PBGInfo^.PleaseDraw then begin
292 293             BitBlt(PBGInfo^.DrawDC, PBGInfo^.R.Left, PBGInfo^.R.Top, WidthOf(PBGInfo^.R), HeightOf(PBGInfo^.R),
293 294                      SkinData.FCacheBmp.Canvas.Handle, PBGInfo^.Offset.X, PBGInfo^.Offset.Y, SRCCOPY);

   
File: sPanel.pas  
395 395       AC_ENDPARENTUPDATE : begin
396 396         if FCommonData.FUpdating then begin
397 397           FCommonData.FUpdating := False;
398 398           FCommonData.FUpdating := FCommonData.Updating;
399 399           if not FCommonData.FUpdating
400 400             then RedrawWindow(Handle, nil, 0, RDW_INVALIDATE or RDW_ERASE or RDW_FRAME or RDW_UPDATENOW);
401           end
402           else if FCommonData.BGChanged then PrepareCache;
  401         end;
  402 //        else if FCommonData.BGChanged then PrepareCache;
403 403         SetParentUpdated(Self);
404 404         Exit;
405 405       end;
406 406       AC_PREPARING : begin
407           Message.Result := integer(InUpdating(FCommonData) or ((FCommonData.FCacheBmp.Width <> Width) or (FCommonData.FCacheBmp.Height <> Height)) and IsCached(FCommonData) and not SkinData.CustomColor);
  407         Message.Result := integer(FCommonData.Updating or ((FCommonData.FCacheBmp.Width <> Width) or (FCommonData.FCacheBmp.Height <> Height)) and IsCached(FCommonData) and not SkinData.CustomColor);
408 408         Exit;
409 409       end
410 410       else if CommonMessage(Message, FCommonData) then Exit;
411 411     end
412 412     else begin
413 413       case Message.Msg of

   
File: sVclUtils.pas  
72 72     property Canvas;
73 73   end;
74 74  
75 75   TacHideTimer = class(TacThreadedTimer)
76 76   public
77 77     Dlg : TacDialogWnd;
78       ParentWnd: THandle;
  78     sp : TsSkinProvider;
79 79  
80 80     DC : hdc;
81 81     Form : TForm;
82 82     FBmpSize: TSize;
83 83     FBmpTopLeft: TPoint;
84 84     FBlend: TBlendFunction;
85 85     dx, dy : real;
86 86     l, t, r, b : real;
87 87     StartBlendValue, i : integer;
88 88     StepCount : integer;
89 89     AnimType : TacAnimType;
90 90     DelayValue : integer;
91       EventCalled : boolean;
92 91  
93 92     Trans : real;
94 93     p : real;
95 94     SrcBmp : TBitmap;
96 95     DstBmp : TBitmap;
97 96     procedure Anim_Init;
98       procedure CallEvent;
99 97     procedure Anim_DoNext;
100 98     procedure Anim_GoToNext;
101 99     procedure OnTimerProc(Sender: TObject);
102       constructor Create(AOwner: TComponent); override;
103 100     destructor Destroy; override;
104 101   end;
105 102  
106 103 var
107 104   ow : TOutPutwindow = nil;
108 105   InAnimationProcess : boolean = False;
 
409 406     SetWindowRgn(AnimForm.Handle, sp.BorderForm.MakeRgn, False);
410 407     if sp.SkinData.SkinManager.SkinData.UseAeroBluring then sp.BorderForm.UpdateExBordersPos(True);
411 408   end;
412 409   if Assigned(sp.OnAfterAnimation) then sp.OnAfterAnimation(aeShowing);
413 410 end;
414 411  
415   procedure HideAnimForm(Form : TForm; SrcBmp : TBitmap; ATime : integer; StartBlendValue : integer; AnimType : TacAnimType; ParentWnd: THandle);
  412 procedure HideAnimForm(Form : TForm; SrcBmp : TBitmap; ATime : integer; StartBlendValue : integer; AnimType : TacAnimType);
416 413 begin
417 414   if (acHideTimer <> nil) and (acHideTimer.Form <> nil) then FreeAndNil(acHideTimer.Form);
418 415   if ATime div acTimerInterval = 0 then begin
419 416     if Form <> nil then Form.Free;
420 417     if SrcBmp <> nil then SrcBmp.Free;
421 418     Exit;
422 419   end;
423 420   if acHideTimer = nil then acHideTimer := TacHideTimer.Create(Application);
424    
425     acHidetimer.ParentWnd := ParentWnd;
426    
427     acHideTimer.EventCalled := False;
428 421   acHideTimer.i := 0;
429 422   if (acHideTimer.SrcBmp <> nil) and (acHideTimer.SrcBmp <> SrcBmp) then FreeAndNil(acHideTimer.SrcBmp);
430 423   acHideTimer.SrcBmp := SrcBmp;
431 424   acHideTimer.StartBlendValue := StartBlendValue;
432 425   acHideTimer.Form := Form;
433 426   acHideTimer.AnimType := AnimType;
 
516 509     DoLayered(sp.Form.Handle, True, 1);
517 510     acDstBmp := CreateBmp32(sp.SkinData.FCacheBmp.Width, sp.SkinData.FCacheBmp.Height);
518 511     BitBlt(acDstBmp.Canvas.Handle, 0, 0, sp.SkinData.FCacheBmp.Width, sp.SkinData.FCacheBmp.Height, sp.SkinData.FCacheBmp.Canvas.Handle, 0, 0, SRCCOPY);
519 512     FillAlphaRect(acDstBmp, Rect(0, 0, acDstBmp.Width, acDstBmp.Height), MaxByte);
520 513   end;
521 514   ////////////////////////////////
522     HideAnimForm(AnimForm, acDstBmp, sp.SkinData.SkinManager.AnimEffects.FormHide.Time, MaxByte, sp.SkinData.SkinManager.AnimEffects.FormHide.Mode, sp.Form.Handle);
  515   HideAnimForm(AnimForm, acDstBmp, sp.SkinData.SkinManager.AnimEffects.FormHide.Time, MaxByte, sp.SkinData.SkinManager.AnimEffects.FormHide.Mode);
523    
524     DoLayered(sp.Form.Handle, False, b);
  516   if b < MaxByte then DoLayered(sp.Form.Handle, False, b);
525 517   if (sp.BorderForm <> nil) then begin
526 518     if Application.Terminated
527 519       then FreeAndNil(sp.BorderForm)
528 520       else if (sp.BorderForm.AForm <> nil) then FreeAndNil(sp.BorderForm.AForm);
529 521   end;
530 522   ////////////////////////////////
 
595 587   else begin
596 588     if ListSW.CoverForm <> nil then AnimForm := ListSW.CoverForm else AnimForm := MakeCoverForm(ListSW.CtrlHandle);
597 589     acDstBmp := CreateBmp32(ListSW.SkinData.FCacheBmp.Width, ListSW.SkinData.FCacheBmp.Height);
598 590     BitBlt(acDstBmp.Canvas.Handle, 0, 0, acDstBmp.Width, acDstBmp.Height, ListSW.SkinData.FCacheBmp.Canvas.Handle, 0, 0, SRCCOPY);
599 591   end;
600 592  
601     HideAnimForm(AnimForm, acDstBmp, ListSW.SkinData.SkinManager.AnimEffects.DialogHide.Time, MaxByte, ListSW.SkinData.SkinManager.AnimEffects.DialogHide.Mode, 0);
  593   HideAnimForm(AnimForm, acDstBmp, ListSW.SkinData.SkinManager.AnimEffects.DialogHide.Time, MaxByte, ListSW.SkinData.SkinManager.AnimEffects.DialogHide.Mode);
602 594   if ListSW.BorderForm <> nil then begin
603 595     ListSW.BorderForm.AForm := nil;
604 596     FreeAndNil(ListSW.BorderForm);
605 597   end;
606 598   InAnimationProcess := False;
607 599 end;
 
778 770   SetWindowRgn(AnimForm.Handle, 0, False);
779 771   SetWindowPos(AnimForm.Handle, 0, 0, 0, 0, 0, Flags or SWP_NOSIZE or SWP_NOMOVE);
780 772   UpdateLayeredWindow(AnimForm.Handle, DC, nil, @FBmpSize, DstBmp.Canvas.Handle, @FBmpTopLeft, clNone, @FBlend, ULW_ALPHA);
781 773  
782 774   FreeAndNil(AnimBmp);
783 775   ReleaseDC(0, DC);
784     UpdateRgn(ListSW, False);
785 776  
786 777   SendMessage(ListSW.CtrlHandle, WM_SETREDRAW, 1, 0); // Vista
787 778   InAnimationProcess := False;
788 779  
789     if AeroIsEnabled then Sleep(4 * acTimerInterval); // Blinking in Aero removing
790 780   if ListSW.BorderForm <> nil then begin
791 781     ListSW.BorderForm.ExBorderShowing := True;
792       RedrawWindow(ListSW.CtrlHandle, nil, 0, RDW_FRAME or RDW_ALLCHILDREN or RDW_INVALIDATE or RDW_ERASE or RDW_UPDATENOW);
  782     RedrawWindow(ListSW.CtrlHandle, nil, 0, RDW_FRAME or RDW_ALLCHILDREN or RDW_INVALIDATE{ or RDW_ERASE} or RDW_UPDATENOW);
793 783     UpdateRgn(ListSW, False);
794 784     ListSW.BorderForm.ExBorderShowing := False;
795 785     ListSW.BorderForm.UpdateExBordersPos(True);
796 786   end
797 787   else RedrawWindow(ListSW.CtrlHandle, nil, 0, RDW_FRAME or RDW_ALLCHILDREN or RDW_INVALIDATE or RDW_ERASE or RDW_UPDATENOW);
798 788  
  789   if AeroIsEnabled then Sleep(4 * acTimerInterval); // Blinking in Aero removing
799 790   SetWindowPos(AnimForm.Handle, ListSW.CtrlHandle, 0, 0, 0, 0, Flags or SWP_NOSIZE or SWP_NOMOVE);
800 791  
801 792   FreeAndNil(DstBmp);
802 793   if ListSW.BorderForm = nil then FreeAndNil(AnimForm);
803 794 end;
804 795  
 
1599 1590     else begin
1600 1591       dx := 0; dy := 0; l := 0; t := 0; r := 0; b := 0;
1601 1592     end;
1602 1593   end
1603 1594 end;
1604 1595  
1605   procedure TacHideTimer.CallEvent;
1606   var
1607     sp : TsSkinProvider;
1608   begin
1609     if not EventCalled and (ParentWnd <> 0) then begin
1610       sp := TsSkinProvider(SendAMessage(ParentWnd, AC_GETPROVIDER));
1611       if (sp <> nil) and Assigned(sp.OnAfterAnimation) then begin
1612         EventCalled := True;
1613         sp.OnAfterAnimation(aeHiding);
1614       end;
1615     end;
1616   end;
1617    
1618   constructor TacHideTimer.Create(AOwner: TComponent);
1619   begin
1620     ParentWnd := 0;
1621     EventCalled := False;
1622     inherited;
1623   end;
1624    
1625 1596 destructor TacHideTimer.Destroy;
1626 1597 begin
1627 1598   inherited;
1628     CallEvent;
1629 1599   FreeAndNil(SrcBmp);
1630 1600   FreeAndNil(DstBmp);
1631 1601   FreeAndNil(Form);
1632 1602 end;
1633 1603  
1634 1604 procedure TacHideTimer.OnTimerProc(Sender: TObject);
 
1639 1609     UpdateLayeredWindow(Form.Handle, DC, nil, @FBmpSize, DstBmp.Canvas.Handle, @FBmpTopLeft, clNone, @FBlend, ULW_ALPHA);
1640 1610     ReleaseDC(0, DC);
1641 1611     Anim_GoToNext;
1642 1612     inc(i);
1643 1613   end
1644 1614   else begin
1645       CallEvent;
1646 1615     Interval := MaxWord;
1647 1616     OnTimer := nil;
1648 1617     FreeAndNil(Form);
1649 1618     FreeAndNil(SrcBmp);
1650 1619     FreeAndNil(DstBmp);
1651 1620   end;

   
File: sSkinProvider.pas  
280 280     procedure RepaintButton(i : integer);
281 281     procedure RepaintMenuItem(mi : TMenuItem; R : TRect; State : TOwnerDrawState);
282 282     procedure SaveBGForBtns(Full : boolean = False);
283 283     procedure RestoreBtnsBG;
284 284  
285 285     procedure OurPaintHandler(const Msg : TWMPaint);
286       procedure ProcessMessage(Msg : Cardinal; WPar : WPARAM = 0; LPar : LPARAM = 0);
  286     procedure ProcessMessage(Msg : Cardinal; WParam : WPARAM = 0; LParam : LPARAM = 0);
287 287     procedure AC_WMEraseBkGnd(aDC: hdc);
288 288     procedure AC_WMNCPaint;
289 289     procedure AC_WMNCCalcSize(var Message : TWMNCCalcSize);
290 290     procedure AC_WMGetMinMaxInfo(var Message : TWMGetMinMaxInfo);
291 291 {$IFNDEF ALITE}
292 292     procedure AC_CMMouseWheel(var Message : TCMMouseWheel);
 
3299 3300         end;
3300 3301         WM_SIZING : begin
3301 3302           OldWndProc(Message);
3302 3303           if BorderForm <> nil then BorderForm.UpdateExBordersPos(False);
3303 3304         end;
3304 3305         WM_MOUSELEAVE, CM_MOUSELEAVE : begin
3305             // If not title bar items (solves a problem with tabs hovering)
3306             if (CurrentHT < HTITEM) or (BorderForm = nil) then SetHotHT(-1);
  3306           SetHotHT(-1);
3307 3307           biClicked := False;
3308 3308           OldWndProc(Message);
3309 3309         end;
3310 3310         CM_MOUSEENTER : begin
3311 3311           OldWndProc(Message);
3312 3312           FCommonData.SkinManager.ActiveControl := Form.Handle;
 
4347 4347             end;
4348 4348  
4349 4349  
4350 4350   {$IFNDEF NOWNDANIMATION}
4351 4351             if Assigned(SkinData.SkinManager) and acLayered and DrawNonClientArea then begin
4352 4352               if not SkipAnimation then begin
4353                   if (TWMWindowPosChanged(Message).WindowPos.Flags and SWP_HIDEWINDOW = SWP_HIDEWINDOW)
4354                        and (SkinData.FCacheBmp <> nil {it's possible under Aero}) then begin // Window will be hidden
  4353                 if (TWMWindowPosChanged(Message).WindowPos.Flags and SWP_HIDEWINDOW = SWP_HIDEWINDOW) and (SkinData.FCacheBmp <> nil {it's possible under Aero})  then begin // Window will be hidden
4355 4354                   if not IsIconic(Form.Handle) then begin
4356 4355                     if (SkinData.SkinManager.ShowState <> saMinimize) {and (FormState and FS_ANIMMINIMIZING <> FS_ANIMMINIMIZING) }then begin // Closing
4357 4356                       if FAllowAnimation and (SkinData.SkinManager.AnimEffects.FormHide.Active) and (SkinData.SkinManager.AnimEffects.FormHide.Time > 0) and (FormState and FS_ANIMCLOSING <> FS_ANIMCLOSING) and (Form.FormStyle <> fsMDIChild) then begin
4358 4357                         FormState := FormState or FS_ANIMCLOSING;
4359 4358                         SkinData.FCacheBmp := GetFormImage(Self, True);
4360 4359                         if BorderForm <> nil then begin
 
4371 4370                         else begin
4372 4371                           CoverForm := MakeCoverForm(Form.Handle);
4373 4372                         end;
4374 4373                       end;
4375 4374                     end;
4376 4375                   end;
4377                   end
4378                   else if IsIconic(Form.Handle) then begin
4379                     OldWndProc(Message);
4380    
4381                     if (Form <> Application.MainForm) and (Form.WindowState = wsMinimized) and IsWindowVisible(Form.Handle) then begin
4382                       StartMinimizing(Self);
4383                     end;
4384                     Exit;
4385 4376                 end
4386 4377                 // Resizing of form
4387 4378                 else if (BorderForm <> nil) and (BorderForm.AForm <> nil) and (TWMWindowPosChanging(Message).WindowPos^.cx <> 0) and (TWMWindowPosChanging(Message).WindowPos^.cy <> 0) and
4388 4379                              (TWMWindowPosChanged(Message).WindowPos.Flags and SWP_NOACTIVATE = SWP_NOACTIVATE) and
4389 4380                              (FormState and FS_ANIMMINIMIZING <> FS_ANIMMINIMIZING) and
4390 4381                              (TWMWindowPosChanged(Message).WindowPos.Flags and SWP_NOMOVE <> SWP_NOMOVE) and
 
4753 4744 begin
4754 4745   if Btn.HintWnd <> nil then FreeAndNil(Btn.HintWnd);
4755 4746 end;
4756 4747  
4757 4748 procedure TsSkinProvider.SetHotHT(i: integer; Repaint : boolean = True);
4758 4749 begin
4759     if i = CurrentHT then Exit;
4760 4750   if not FDrawNonClientArea then Exit;
4761 4751   if HotItem.Item <> nil then begin
4762 4752     RepaintMenuItem(HotItem.Item, HotItem.R, []);
4763 4753     HotItem.Item := nil;
4764 4754   end;
  4755 //  if (CurrentHT = i) or (CurrentHT = -1) and (i = 0) then Exit;
 
5263 5255           if exBorders then begin
5264 5256             ChangedIndex := sMan.ConstData.ExBorder; // Index of extended border in skin
5265 5257             iDrawMode := sMan.ma[ChangedIndex].DrawMode and BDM_STRETCH;
5266 5258             PaintControlByTemplate(FCommonData.FCacheBmp, BorderForm.ShadowTemplate, Rect(0, 0, fWidth, fHeight),
5267 5259                 Rect(0, 0, BorderForm.ShadowTemplate.Width, BorderForm.ShadowTemplate.Height),
5268 5260                 Rect(ma[ChangedIndex].WL, min(ma[ChangedIndex].WT, CaptionHeight + (FCommonData.FCacheBmp.Height - CaptionHeight) div 2),
5269                        ma[ChangedIndex].WR, min(ma[ChangedIndex].WB, (FCommonData.FCacheBmp.Height - CaptionHeight) div 2)),
  5261                      ma[ChangedIndex].WR, ma[ChangedIndex].WB + integer(LinesCount > 0)),
5270 5262                 Rect(ShadowSize.Left + BorderWidth, ShadowSize.Top + i, ShadowSize.Right + BorderWidth, ShadowSize.Bottom + BorderWidth + 2),
5271 5263                 Rect(iDrawMode, iDrawMode, iDrawMode, iDrawMode), False, False); // Uncomment in BETA
5272 5264  
5273 5265             PaintTitle;
5274 5266             PaintText;
5275 5267  
 
5645 5637   Result := False;
5646 5638   if not fGlobalFlag then begin
5647 5639     fGlobalFlag := True;
5648 5640     if (Form.Menu <> nil) and (Form.Menu.Items.Count > 0) and (Form.Menu.Items[0] <> nil)
5649 5641         {and (Form.Menu.BiDiMode = bdLeftToRight) {Avoiding a Delphi bug when position of menus is wrong (when RTL)} then begin
5650 5642       TAccessMenuItem(Form.Menu.Items[0]).MenuChanged(True);
5651         SkinData.BeginUpdate;
5652 5643       TAccessMenu(Form.Menu).AdjustBiDiBehavior;
5653         SkinData.EndUpdate;
5654 5644       Result := True;
5655 5645     end;
5656 5646     fGlobalFlag := False;
5657 5647   end;
5658 5648 end;
5659 5649  
 
6403 6393 begin
6404 6394   if Active and HaveBorder(Self) and DrawNonClientArea and (Form.Parent = nil) and (Form.FormStyle <> fsMDIChild) and
6405 6395         FAllowExtBorders and not ((Form.WindowState = wsMaximized) and ac_NoExtBordersIfMax) then begin
6406 6396     if BorderForm = nil then begin
6407 6397       BorderForm := TacBorderForm.Create(Self);
6408 6398       BorderForm.SkinData := FCommonData;
6409       end;
6410 6399       FCommonData.BGChanged := True;
6411 6400       BorderForm.UpdateExBordersPos;
  6401     end;
6412 6402   end
6413 6403   else begin
6414 6404     if BorderForm <> nil then FreeAndNil(BorderForm);
6415 6405   end;
6416 6406 end;
6417 6407  
 
6588 6578       SetHotHT(0);
6589 6579       OldWndProc(TMessage(Message));
6590 6580     end;
6591 6581   end;
6592 6582 end;
6593 6583  
6594   procedure TsSkinProvider.ProcessMessage(Msg : Cardinal; WPar : WPARAM = 0; LPar : LPARAM = 0);
  6584 procedure TsSkinProvider.ProcessMessage(Msg : Cardinal; WParam : WPARAM = 0; LParam : LPARAM = 0);
6595 6585 var
6596 6586   acM : TMessage;
6597 6587 begin
6598     acM := MakeMessage(Msg, WPar, LPar, 0);
  6588   acM := MakeMessage(Msg, WParam, LParam, 0);
6599 6589   NewWndProc(acM);
6600 6590 end;
6601 6591  
6602 6592 procedure TsSkinProvider.CalcItems;
6603 6593 var
6604 6594   i, mi, Index, FullRight : integer;
 
6814 6804   if Item.Enabled then DstBmp := Bmp else begin
6815 6805     DstBmp := TBitmap.Create;
6816 6806     DstBmp.Assign(Bmp); // Copy an image for disabled (semitransparent Btn drawing)
6817 6807   end;
6818 6808  
6819 6809   if Item.ContentSize.cx = 0 then begin
6820       Item.UpdateSize(not Item.AutoSize);
  6810     if Item.AutoSize
  6811       then Item.UpdateSize;
6821 6812   end;
6822 6813  
6823 6814   DstBmp.Canvas.Font.Assign(Item.FontData.UsedFont);
6824 6815  
6825 6816   if sIndex >= 0 then iState := min(Item.State, min(sMan.gd[sIndex].States - 1, 1)) else iState := 0;
6826 6817  
 
8684 8675  
8685 8676       if (FOwner is TsSkinProvider) and (TsSkinProvider(FOwner).Form.WindowState = wsMaximized) then begin // Solving a problem with hidden taskbar
8686 8677         if yAeroTab <> 0 then SkinData.FCacheBmp.Height := SkinData.FCacheBmp.Height - ShadowSize.Bottom - SysBorderWidth(TsSkinProvider(FOwner).Form.Handle, Self) - yAeroTab;
8687 8678         FBmpSize.cy := SkinData.FCacheBmp.Height;
8688 8679         AForm.Height := FBmpSize.cy;
8689 8680       end;
8690         AForm.HandleNeeded;
8691         if AForm.HandleAllocated then begin
  8681  
8692 8682       if SkinData.SkinManager.Effects.AllowAeroBluring and SkinData.SkinManager.SkinData.UseAeroBluring then begin
8693 8683         MakeBluringRgn;
8694 8684         SetBlurBehindWindow(AForm.Handle, True, bRgn);
8695 8685       end
8696 8686       else SetBlurBehindWindow(AForm.Handle, False, 0);
8697 8687  
 
8704 8694       if GetWindowLong(AForm.Handle, GWL_STYLE) and WS_VISIBLE <> WS_VISIBLE then begin
8705 8695         if Blend = 0 then SetWindowLong(oWnd, GWL_STYLE, GetWindowLong(oWnd, GWL_STYLE) and not WS_VISIBLE); // Preventing of the main form painting
8706 8696         SetWindowPos(AForm.Handle, iInsAfter, 0, 0, 0, 0, SWP_NOACTIVATE or SWP_SHOWWINDOW or SWP_NOSIZE or SWP_NOMOVE);// or SWP_NOOWNERZORDER);
8707 8697         if Blend = 0 then SetWindowLong(oWnd, GWL_STYLE, GetWindowLong(oWnd, GWL_STYLE) or WS_VISIBLE);
8708 8698       end
8709 8699       else SetWindowPos(AForm.Handle, iInsAfter, 0, 0, 0, 0, Flags or SWP_NOSIZE or SWP_NOMOVE);
8710         end;
8711 8700     end
8712 8701     else SetWindowPos(AForm.Handle, iInsAfter, p.X, p.Y, 0, 0, Flags or SWP_NOSIZE);
8713 8702   end;
8714 8703   ExBorderShowing := False;
8715 8704 end;
8716 8705  

   
File: sSkinManager.pas  
8 8   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, sDefaults,{$IFDEF DELPHI_XE3}UITypes, {$ENDIF}
9 9   sConst, IniFiles, sMaskData, sSkinMenus, jpeg, sStyleSimply, acSkinPack, menus, {$IFNDEF DELPHI5}Types, {$ENDIF}acntUtils
10 10   {$IFDEF LOGGED}, sDebugMsgs{$ENDIF};
11 11  
12 12 {$IFNDEF NOTFORHELP}
13 13 const
14     CurrentVersion = '8.16';
  14   CurrentVersion = '8.15';
15 15  
16 16 {$ENDIF} // NOTFORHELP
17 17  
18 18 {$R sxb.res}
19 19  
20 20 type

   
File: acAlphaHints.pas  
7 7 uses
8 8   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, sGraphUtils, sConst, acntUtils, {$IFDEF TNTUNICODE} TntForms, {$ENDIF}
9 9   sHtmlParse, acPNG{$IFDEF DELPHI7UP}, Types{$ENDIF};
10 10  
11 11 {$IFNDEF NOTFORHELP}
12 12 const
13     DefAnimationTime = 150;
  13   DefAnimationTime = 250;
14 14 {$ENDIF}
15 15  
16 16 type
17 17 {$IFNDEF NOTFORHELP}
18 18   TacMousePosition = (mpLeftTop, mpLeftBottom, mpRightTop, mpRightBottom);
19 19   TacBorderDrawMode = (dmRepeat, dmStretch);

   
File: acTitleBar.pas  
169 169     procedure InitFont;
170 170  
171 171     procedure DoMouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
172 172     procedure DoMouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
173 173     procedure DoClick;
174 174     procedure Changed;
175       procedure UpdateSize(ContentOnly : boolean = False);
  175     procedure UpdateSize;
176 176  
177 177     procedure Invalidate(RecalcSize : boolean = False);
178 178     function GetDisplayName: string; override;
179 179     function IntXMargin : integer;
180 180     property DefaultMenuBtn : TBitmap read FDefaultMenuBtn;
181 181     property DroppedDown : boolean read FDroppedDown;
 
727 727 procedure TsTitleBar.Invalidate;
728 728 begin
729 729   if Assigned(Form) and not (csLoading in Form.ComponentState) then SendMessage(Form.Handle, SM_ALPHACMD, MakeWParam(0, AC_NCPAINT), 1);
730 730 end;
731 731  
732 732 procedure TsTitleBar.Loaded;
733   var
734     i : integer;
  733 //var
  734 //  i : integer;
735 735 begin
736 736   inherited;
737     for i := 0 to Items.Count - 1 do if Items[i].AutoSize then Items[i].UpdateSize;
  737 //  for i := 0 to Items.Count - 1 do if Items[i].AutoSize then Items[i].UpdateSize;
738 738 end;
739 739  
740 740 procedure TsTitleBar.Notification(AComponent: TComponent; Operation: TOperation);
741 741 begin
742 742   inherited Notification(AComponent, Operation);
743 743   if (AComponent is TCustomImageList) then case Operation of
 
1140 1140       FFontData.UsedFont.Charset := DEFAULT_CHARSET;
1141 1141       ts := GetStringSize(FFontData.UsedFont.Handle, acDownChar); // Size of arrow
1142 1142       inc(FContentSize.cx, ts.cx);
1143 1143     end;
1144 1144  
1145 1145     if Style in [bsTab, bsMenu] then inc(FContentSize.cy, 1);
1146       if not ContentOnly and not (Style in [bsSpacing]) then begin
  1146     if not (Style in [bsSpacing]) then begin
1147 1147       FWidth := max(16, FContentSize.cx + 2 * (TacTitleItems(Collection).FOwner.ItemsMargin + IntXMargin));
1148 1148       FHeight := max(16, FContentSize.cy + 2 * (TacTitleItems(Collection).FOwner.ItemsMargin));
1149 1149     end;
1150 1150   end;
1151 1151 end;
1152 1152  

   
File: acGlow.pas  
149 149   FBmpSize: TSize;
150 150   FBmpTopLeft: TPoint;
151 151   dw, dh, dx1, dx2, dy1, dy2 : integer;
152 152   TmpBmp : TBitmap;
153 153   h : HWND;
154 154   NewR : TRect;
155     AddedStyle : longword;
156 155 begin
157 156   if Wnd = nil then begin
158 157     Wnd := TForm.Create(nil);
159 158     Wnd.Tag := ExceptTag;
160 159     OldWndProc := Wnd.WindowProc;
161 160     Wnd.WindowProc := NewWndProc;
 
200 199       dx1 := 0;
201 200       dy1 := 0;
202 201     end;
203 202     Wnd.Width := FBmpSize.cx;
204 203     Wnd.Height := FBmpSize.cy;
205 204     if GetWindowLong(WndHandle, GWL_EXSTYLE) and WS_EX_TOPMOST = WS_EX_TOPMOST then begin
206   //      Wnd.FormStyle := fsStayOnTop;
  205       Wnd.FormStyle := fsStayOnTop;
207 206       h := HWND_TOPMOST
208 207     end
209 208     else h := GetNextWindow(WndHandle, GW_HWNDPREV);
210 209     NewR := Rect(R.Left - SkinManager.MaskWidthLeft(MaskIndex) + Margin + dx1, R.Top - SkinManager.MaskWidthTop(MaskIndex) + Margin + dy1, 0, 0);
211 210  
212 211     if h = 0 then h := WndHandle;
213       Wnd.HandleNeeded;
214    
215       if Wnd.HandleAllocated then begin
216         AddedStyle := WS_EX_LAYERED or WS_EX_NOACTIVATE or WS_EX_TRANSPARENT or WS_EX_TOOLWINDOW;
217         SetWindowLong(Wnd.Handle, GWL_EXSTYLE, GetWindowLong(Wnd.Handle, GWL_EXSTYLE) or AddedStyle);
  212     SetWindowLong(Wnd.Handle, GWL_EXSTYLE, GetWindowLong(Wnd.Handle, GWL_EXSTYLE) or WS_EX_LAYERED or WS_EX_NOACTIVATE or WS_EX_TRANSPARENT or WS_EX_TOOLWINDOW);
218 213     SetWindowPos(Wnd.Handle, h, NewR.Left, NewR.Top,
219 214       0, 0, SWP_NOACTIVATE or SWP_NOOWNERZORDER or SWP_NOSENDCHANGING or SWP_NOSIZE {or SWP_NOZORDER {Preventing of windows positions changing});
220 215     Wnd.Left := NewR.Left;
221 216     Wnd.Top := NewR.Top;
222 217     FBmpTopLeft := Point(0, 0);
223 218  
224 219     DC := GetDC(0);
225 220     UpdateLayeredWindow(Wnd.Handle, DC, nil, @FBmpSize, AlphaBmp.Canvas.Handle, @FBmpTopLeft, 0, @FBlend, ULW_ALPHA);
226 221     ShowWindow(Wnd.Handle, SW_SHOWNOACTIVATE);
227 222     ReleaseDC(0, DC);
228       end;
229    
230 223     FreeAndNil(AlphaBmp);
231 224   end;
232 225 end;
233 226  
234 227 initialization

   
File: acLFPainter.pas  
29 29 {$ENDIF}
30 30  
31 31 interface
32 32  
33 33 uses
34 34   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs{$IFNDEF DELPHI5}, Types{$ENDIF},
35     sSkinManager, sStyleSimply, sMaskData, cxLookAndFeelPainters, cxGraphics, cxClasses, ImgList, dxCore
36     {$IFDEF VER12_1_6}, cxPCPainters, cxPC, cxLookAndFeels, cxPCPaintersFactory {$ENDIF} ;
  35   sSkinManager, sStyleSimply, sMaskData, cxLookAndFeelPainters, cxGraphics, cxClasses, ImgList, dxCore;
37 36  
38 37 type
39 38  
40 39   TsDevExProvider = class(TComponent)
41 40   end;
42 41  
 
369 368     // Splitter
370 369 //    procedure DrawSplitter(ACanvas: TcxCanvas; const ARect: TRect;
371 370 //      AHighlighted: Boolean; AClicked: Boolean; AHorizontal: Boolean); override;
372 371     function GetSplitterSize(AHorizontal: Boolean): TSize; override;
373 372   end;
374 373  
375   {$IFDEF VER12_1_6}
376     TcxACPCPainter = class(TcxPCTabsPainter)
377     protected
378       function GetFreeSpaceColor: TColor; override;
379       function AlwaysColoredTabs: Boolean; override;
380       class function GetStyleID: TcxPCStyleID; override;
381       class function GetStyleName: TCaption; override;
382       procedure InternalPaintTab(ACanvas: TcxCanvas; ATabVisibleIndex: Integer); override;
383       function GetClientColor: TColor; override;
384       function GetTabBodyColor(TabVisibleIndex: Integer): TColor; override;
385       procedure PaintFrameBorder(ACanvas: TcxCanvas; R: TRect); override;
386     public
387     end;
388   {$ENDIF}
389    
390    
391 374 {.$DEFINE ACDEBUG}
392 375  
393 376 implementation
394 377  
395 378 uses sGraphUtils, sSkinProps, acntUtils, sConst, sAlphaGraph, math, sVCLUtils, cxControls,
396     sThirdParty, dxSkinInfo;
  379   cxLookAndFeels, sThirdParty, dxSkinInfo;
397 380  
398 381 var
399 382   DefManager : TsSkinManager = nil;
400 383   OldDXSkin : string;
401 384  
402 385 type
 
2378 2361   if GetExtendedStylePainters <> nil then begin
2379 2362 {$ENDIF} 
2380 2363     vPainter := nil;
2381 2364     if Active then begin
2382 2365       if not cxLookAndFeelPaintersManager.GetPainter(s_AlphaSkins, vPainter) then begin
2383 2366         cxLookAndFeelPaintersManager.Register(TcxACLookAndFeelPainter.Create);
2384   {$IFDEF VER12_1_6}
2385           RegisterPCPainterClass(TcxACPCPainter);
2386   {$ENDIF}
2387 2367         RootLookAndFeel.Kind := lfStandard;
2388 2368         RootLookAndFeel.SkinName := s_AlphaSkins;
2389 2369       end;
2390 2370     end
2391 2371     else
2392 2372       if (cxLookAndFeelPaintersManager <> nil) then // Added by Witcher 28.12.2012 10:41:58
2393 2373         if cxLookAndFeelPaintersManager.GetPainter(s_AlphaSkins, vPainter) then begin
2394   {$IFDEF VER12_1_6}
2395             UnregisterPCPainterClass(TcxPCTabsPainter);
2396   {$ENDIF}
2397 2374           RootLookAndFeel.SkinName := '';
2398 2375           cxLookAndFeelPaintersManager.Unregister(s_AlphaSkins);
2399 2376         end;
2400 2377 {$IFNDEF VER12_1_6}
2401 2378   end;
2402 2379 {$ENDIF} 
 
2429 2406     end
2430 2407     else Result := False;
2431 2408   end
2432 2409   else Result := False;
2433 2410 end;
2434 2411  
2435   {$IFDEF VER12_1_6}
2436    
2437    
2438    
2439   function TcxACPCPainter.AlwaysColoredTabs: Boolean;
2440   begin
2441     Result := True;
2442   end;
2443    
2444   function TcxACPCPainter.GetClientColor: TColor;
2445   begin
2446     if Skinned then Result := DefaultManager.GetGlobalColor else Result := inherited GetClientColor;
2447   end;
2448    
2449   function TcxACPCPainter.GetFreeSpaceColor: TColor;
2450   begin
2451     if Skinned then Result := DefaultManager.GetGlobalColor else Result := inherited GetFreeSpaceColor;
2452   end;
2453    
2454   class function TcxACPCPainter.GetStyleID: TcxPCStyleID;
2455   begin
2456     Result := 12;
2457   end;
2458    
2459   class function TcxACPCPainter.GetStyleName: TCaption;
2460   begin
2461     Result := s_AlphaSkins;
2462   end;
2463    
2464   function TcxACPCPainter.GetTabBodyColor(TabVisibleIndex: Integer): TColor;
2465   begin
2466     if Skinned then Result := DefaultManager.GetGlobalColor else Result := inherited GetClientColor;
2467   end;
2468    
2469   type
2470     TAccessTabControlProperties = class(TcxCustomTabControlProperties);
2471    
2472   procedure TcxACPCPainter.InternalPaintTab(ACanvas: TcxCanvas; ATabVisibleIndex: Integer);
2473   var
2474     ABitmap: TcxBitmap;
2475     ATabRect: TRect;
2476     ATabViewInfo: TcxTabViewInfo;
2477     ATabOrigin: TPoint;
2478    
2479     i : integer;
2480     s : string;
2481     State : integer;
2482     CI : TCacheInfo;
2483   begin
2484     if Skinned then begin
2485       ATabViewInfo := TabViewInfo[ATabVisibleIndex];
2486       ATabRect := ATabViewInfo.FullRect;
2487       if ATabViewInfo.IsMainTab then ATabRect := GetExtendedRect(ATabRect, Rect(0, 0, 0, -1), ATabViewInfo.PaintingPosition);
2488       ABitmap := TcxBitmap.CreateSize(0, 0, pf32bit);
2489       ABitmap.Canvas.Lock;
2490       try
2491         ABitmap.SetSize(ATabRect);
2492         ATabOrigin := ATabRect.TopLeft;
2493         if ATabViewInfo.IsActive then State := 2 else if ATabViewInfo.IsHighlighted then State := 1 else State := 0;
2494    
2495         if TAccessTabControlProperties(ATabViewInfo.Properties).TabPosition in [tpTop, tpBottom] then s := s_TabTop else s := s_TabLeft;
2496    
2497         i := DefaultManager.GetSkinIndex(s);
2498         if DefaultManager.IsValidSkinIndex(i) then begin
2499           CI.FillColor := DefaultManager.GetGlobalColor;
2500           CI.Ready := False;
2501           PaintItem(i, s, CI, True, State, Rect(0, 0, ABitmap.Width, ABitmap.Height), Point(0, 0), ABitmap, DefaultManager);
2502         end;
2503         ABitmap.cxCanvas.WindowOrg := ATabOrigin;
2504         DrawTabImageAndText(ABitmap.cxCanvas, ATabVisibleIndex);
2505         DrawFocusRect(ABitmap.cxCanvas, ATabVisibleIndex);
2506         cxBitBlt(ACanvas.Handle, ABitmap.Canvas.Handle, ATabRect, ATabRect.TopLeft, SRCCOPY);
2507       finally
2508         ABitmap.Canvas.Unlock;
2509         FreeAndNil(ABitmap);
2510       end;
2511     end
2512     else inherited;
2513   end;
2514    
2515   procedure TcxACPCPainter.PaintFrameBorder(ACanvas: TcxCanvas; R: TRect);
2516   var
2517     i : integer;
2518     s : string;
2519     Bmp : TBitmap;
2520     CI : TCacheInfo;
2521   begin
2522     if Skinned then begin
2523       s := s_PageControl;
2524       CI.Ready := False;
2525       CI.FillColor := DefaultManager.GetGlobalColor;
2526       i := DefaultManager.GetSkinIndex(s);
2527       if DefaultManager.IsValidSkinIndex(i) then begin
2528         Bmp := CreateBmp32(WidthOf(R), HeightOf(R));
2529         PaintItem(i, s, CI, False, 0, Rect(0, 0, Bmp.Width, Bmp.Height), Point(0, 0), Bmp, DefaultManager);
2530         BitBlt(ACanvas.Handle, R.Left, R.Top, Bmp.Width, Bmp.Height, Bmp.Canvas.Handle, 0, 0, SRCCOPY);
2531         FreeAndNil(Bmp);
2532       end
2533       else FillDC(ACanvas.Handle, R, DefaultManager.GetGlobalColor);
2534     end
2535     else inherited;
2536   end;
2537    
2538   {$ENDIF}
2539    
2540 2412 initialization
2541 2413   InitDevEx := _InitDevEx;
2542 2414   CheckDevEx := _CheckDevEx;
2543 2415   RefreshDevEx := _RefreshDevEx;
2544 2416 //  ThirdPartySkipForms.Add('TcxGridFilterPopup');
2545 2417 //  ThirdPartySkipForms.Add('TcxShellComboBoxPopupWindow');
2546 2418 //  ThirdPartySkipForms.Add('TdxfmColorPalette');
2547 2419 //  ThirdPartySkipForms.Add('TcxPopupCalendar');
2548 2420  
2549 2421 end.

   
File: sPageControl.pas  
875 875   AddToLog(Message);
876 876 {$ENDIF}
877 877   case Message.Msg of
878 878     WM_PAINT : if (Visible or (csDesigning in ComponentState)) then begin
879 879       TWMPaint(Message).DC := BeginPaint(Handle, PS);
880 880       if FCommonData.Skinned then begin
881           if IsCached(FCommonData) and not InAnimationProcess or (csDesigning in ComponentState) then AcPaint(TWMPaint(Message));
  881         if IsCached(FCommonData) and not InAnimationProcess then AcPaint(TWMPaint(Message));
882 882       end
883 883       else StdPaint(TWMPaint(Message));
884 884       ReleaseDC(Handle, TWMPaint(Message).DC);
885 885       EndPaint(Handle, PS);
886 886       Message.Result := 0;
887 887       Exit;

   
File: acLFPainter6.pas  
2307 2307       if not GetExtendedStylePainters.GetPainterByName(s_AlphaSkins, vPainter) then begin
2308 2308         GetExtendedStylePainters.Register(s_AlphaSkins, TcxACLookAndFeelPainter, TdxSkinInfo.Create(nil));
2309 2309         RootLookAndFeel.SkinName := s_AlphaSkins;
2310 2310       end
2311 2311     end
2312 2312     else
  2313       if (cxLookAndFeelPaintersManager <> nil) then // Added by Witcher 28.12.2012 10:43:34
2313 2314         if GetExtendedStylePainters.GetPainterByName(s_AlphaSkins, vPainter) then begin
2314 2315           RootLookAndFeel.SkinName := '';
2315 2316           GetExtendedStylePainters.Unregister(s_AlphaSkins);
2316 2317         end
2317 2318   end;
2318 2319 end;

   
File: acSBUtils.pas  
10198 10198   if Caption <> '' then begin
10199 10199     SkinData.FCacheBmp.Canvas.Font.Assign(TAccessButton(Ctrl).Font);
10200 10200     SkinData.FCacheBMP.Canvas.Brush.Style := bsClear;
10201 10201     R := CaptionRect;
10202 10202     { Calculate vertical layout }
10203 10203     CalcRect := R;
10204       DoDrawText(R, DT_EXPANDTABS or DT_WORDBREAK or DT_CENTER);//GetStringFlags(Ctrl, taLeftJustify));
  10204     DoDrawText(R, DT_EXPANDTABS or DT_WORDBREAK or GetStringFlags(Ctrl, taLeftJustify));
10205 10205   end;
10206 10206 end;
10207 10207  
10208 10208 procedure TacSpeedButtonHandler.DrawGlyph;
10209 10209 var
10210 10210   TmpPng : TPNGGraphic;

   
File: sScrollBox.pas  
205 205   bWidth, i : integer;
206 206   ParentBG : TacBGInfo;
207 207 begin
208 208   bWidth := BorderWidth + 2 * integer(BorderStyle = bsSingle);
209 209   if aDC <> 0 then DC := aDC else DC := GetDC(Handle);
210 210   if IsCached(FCommonData) and not SkinData.CustomColor or Assigned(FOnPaint) then begin
211       if not InUpdating(FCommonData, False) then begin
  211     FCommonData.FUpdating := FCommonData.Updating;
  212     if not FCommonData.FUpdating then begin
212 213       // If transparent and parent is resized
213 214       b := FCommonData.HalfVisible or FCommonData.BGChanged;
214 215  
215 216       if SkinData.RepaintIfMoved then begin
216 217         GetClipBox(DC, R);
217 218         FCommonData.HalfVisible := (WidthOf(R) <> Width) or (HeightOf(R) <> Height)
 
224 225  
225 226       sVCLUtils.PaintControls(DC, Self, b and SkinData.RepaintIfMoved, Point(0, 0));
226 227       MoveWindowOrg(DC, bWidth, bWidth);
227 228     end;
228 229   end
229 230   else begin
230       FCommonData.FUpdating := False;
  231     FCommonData.Updating := False;
231 232     i := SkinBorderMaxWidth(FCommonData);
232 233     R := Rect(0, 0, Width, Height);
233 234     SavedDC := SaveDC(DC);
234 235     ExcludeControls(DC, Self, actGraphic, 0, 0);
235 236     MoveWindowOrg(DC, -bWidth, -bWidth);
236 237     ParentBG.PleaseDraw := False;
237 238     if not SkinData.CustomColor then GetBGInfo(@ParentBG, Self) else begin
238 239       ParentBG.Color := ColorToRGB(Color);
239 240       ParentBG.BgType := btFill;
240 241     end;
241 242  
242 243     if (FCommonData.SkinManager.gd[FCommonData.SkinIndex].Transparency = 100) and (ParentBG.BgType = btCache) then begin
243         if not InUpdating(FCommonData, False) then begin
  244       FCommonData.Updating := FCommonData.Updating;
  245       if not FCommonData.Updating then begin
244 246         if i = 0 then BitBlt(DC, 0, 0, Width, Height, ParentBG.Bmp.Canvas.Handle, ParentBG.Offset.X, ParentBG.Offset.Y, SRCCOPY) else begin
245 247           if FCommonData.FCacheBmp = nil then FCommonData.FCacheBmp := CreateBmp32(Width, Height);
246 248           R := PaintBorderFast(DC, R, i, FCommonData, 0);
247 249           if FCommonData.SkinManager.gd[FCommonData.SkinIndex].Transparency = 100 then FillDC(DC, R, ParentBG.Color) else FillDC(DC, R, GetBGColor(SkinData, 0));
248 250           if i > 0 then BitBltBorder(DC, 0, 0, Width, Height, FCommonData.FCacheBmp.Canvas.Handle, 0, 0, i);
249 251           BitBlt(DC, i, i, Width - 2 * i, Height - 2 * i, ParentBG.Bmp.Canvas.Handle, ParentBG.Offset.X + i, ParentBG.Offset.Y + i, SRCCOPY);
 
318 320 begin
319 321   if FCommonData.Skinned and (BorderStyle <> bsNone) and Visible then begin
320 322     if InAnimationProcess then Exit;
321 323  
322 324     if csDesigning in ComponentState then inherited;
323 325     if IsCached(FCommonData) then begin
  326       FCommonData.Updating := FCommonData.Updating;
  327  
324         if ControlIsReady(Self) and not InUpdating(FCommonData, False) then begin
  328       if ControlIsReady(Self) and not FCommonData.Updating then begin
325 329         if SkinData.BGChanged or (FCommonData.FCacheBmp = nil) then PrepareCache;
326 330         UpdateCorners(FCommonData, 0);
327 331  
328 332         bWidth := 2 * integer(BorderStyle = bsSingle) + BorderWidth;
329 333         DC := GetWindowDC(Handle);
330 334         SavedDC := SaveDC(DC);
 
410 414       else AlphaBroadCast(Self, Message);
411 415       exit
412 416     end;
413 417     AC_REFRESH : begin
414 418       if (LongWord(Message.LParam) = LongWord(SkinData.SkinManager)) then begin
415 419         CommonWndProc(Message, FCommonData);
416           if not InUpdating(SkinData) and not InAnimationProcess
  420         SkinData.Updating := SkinData.Updating;
  421         if not SkinData.Updating and not InAnimationProcess
417 422           then RedrawWindow(Handle, nil, 0, RDW_FRAME + RDW_INVALIDATE + RDW_UPDATENOW + RDW_ERASE)
418 423           else RedrawWindow(Handle, nil, 0, RDW_FRAME + RDW_INVALIDATE + RDW_ERASE);
419 424         RefreshScrolls(SkinData, ListSW);
420 425       end;
421 426       AlphaBroadCast(Self, Message);
422 427       exit
 
480 485           end;
481 486           RedrawWindow(Handle, @R, 0, RDW_ERASE or RDW_INVALIDATE or RDW_ALLCHILDREN or RDW_FRAME or RDW_UPDATENOW);
482 487         end;
483 488       end;
484 489       if Assigned(FOnAfterScroll) then FOnAfterScroll(Self);
485 490     end;
486       AC_ENDPARENTUPDATE : if FCommonData.FUpdating then begin
487         FCommonData.FUpdating := False;
  491     AC_ENDPARENTUPDATE : if FCommonData.Updating then begin
488 492       RedrawWindow(Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE);
  493       FCommonData.Updating := False;
489 494       Exit;
490 495     end
491 496     else begin
492 497       CommonMessage(Message, FCommonData);
493 498       Exit;
494 499     end;

   
File: sGraphUtils.pas  
1002 1002     else begin
1003 1003       Color := CustomColor;
1004 1004       Transparency := 0;
1005 1005     end;
1006 1006     if ci.Ready or (ci.FillColor <> clFuchsia) then case Transparency of
1007 1007       100 : begin
1008           if ci.Ready and (ci.Bmp <> nil) then begin
  1008         if ci.Ready then begin
1009 1009           if (ItemBmp <> ci.Bmp) then BitBlt(ItemBmp.Canvas.Handle, aRect.Left, aRect.Top, WidthOf(aRect, True), HeightOf(aRect, True), ci.Bmp.Canvas.Handle, ci.X + pP.X, ci.Y + pP.Y, SRCCOPY)
1010 1010         end
1011 1011         else FillRect32(ItemBmp, aRect, ci.FillColor);
1012 1012       end;
1013 1013       0 : PaintAddons(ItemBmp);
1014 1014       else begin