[Lazarus] WMPaint

Mattias Gaertner nc-gaertnma at netcologne.de
Mon May 1 17:45:41 CEST 2017


On Sun, 30 Apr 2017 19:06:18 +0300
Alexey via Lazarus <lazarus at lists.lazarus-ide.org> wrote:

> 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?

I don't know any case where this would help.

Mattias


More information about the Lazarus mailing list