procedure TCustomControl.WMPaint(var Message: TLMPaint); begin if (csDestroying in ComponentState) or (not HandleAllocated) then exit; Include(FControlState, csCustomPaint); inherited WMPaint(Message); Exclude(FControlState, csCustomPaint); end;
Maybe use try-finally here for Exclude? -- Regards, Alexey -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus