It doesn't matter. What matters is, as long as you don't call inherited
, default window procedure will not erase the background. Since you're painting the whole surface of the control, you don't need default processing.
What changes when you return '0' or '1' (not '0') is that, when BeginPaint
is called, the system sets the fErase
member of the PAINTSTRUCT
accordingly. When you return '0', it is set 'True', indicating that the background must be erased in the paint process. For '1', it is set 'False', indicating that no erasing is necessary. BeginPaint
is called in TWinControl.PaintHandler
. No one ever checks what fErase
is, VCL only uses the device context BeginPaint
returns, so what you return does not make any difference.
Still, I'd return '1', conceptually hinting that erasing have been taken care of.