BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Painting on top of child controls

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Writing
View previous topic :: View next topic  
Author Message
Mattias Andersson
Guest





PostPosted: Tue Nov 04, 2003 11:41 pm    Post subject: Painting on top of child controls Reply with quote



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


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Writing All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.