Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Painting on top of child controls

0 views
Skip to first unread message

Mattias Andersson

unread,
Nov 4, 2003, 6:41:01 PM11/4/03
to
Hello,

I am writing a TWinControl descendant and I need to be able to paint on top
of any of the associated child controls. How would I go about doing this? Do
I have to trap the WM_PAINT message and manually write my own paint sequence
(similarly to the PaintHandler method in TWinControl), e.g.:

DC := BeginPaint( ... );
for each child do
ExcludeClipRect(DC, ... );
PaintWindow(DC);
PaintControls(DC, nil);
PaintOverlay(DC); // here we paint on top of the child controls
EndPaint( ... );

Would this do the trick? If not, is there another way to achieve the desired
effect?

Thanks in advance,
Mattias


0 new messages