1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17:
| Procedure CompletePaintTo(C:TwinControl;Dest:TCanvas;x,y:Integer;First:Boolean=true); var i:Integer; DC:HDC; begin if First then c.PaintTo(Dest,x,y); for I := 0 to C.ControlCount- 1 do if c.Controls[i] is TCustomEdit then begin DC := GetDC(TCustomEdit(c.Controls[i]).Handle); BitBlt(Dest.Handle, x + c.Controls[i].Left, y + c.Controls[i].Top , c.Controls[i].Width, c.Controls[i].Height,DC,0,0,SRCCOPY); ReleaseDC(TCustomEdit(c.Controls[i]).Handle,DC); end else if c.Controls[i] is TWinControl then CompletePaintTo(TWinControl(c.Controls[i]),Dest,x + c.Controls[i].Left,y + c.Controls[i].Top,false) end; |