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 

OnResize flickering...

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





PostPosted: Fri Nov 07, 2003 11:20 am    Post subject: OnResize flickering... Reply with quote



Hi,
I wrote a TCustomControl descendant. If I put my component in a form with
Align=alClient, when I resize the form my component does flick, because my
form paints gray on my component and the repaint my component.
Does anyone know what can I do?

Thanks,
Ugo Galbiati.


Back to top
Yorai Aminov (TeamB)
Guest





PostPosted: Fri Nov 07, 2003 12:43 pm    Post subject: Re: OnResize flickering... Reply with quote



On Fri, 7 Nov 2003 12:20:20 +0100, "Ugo Galbiati"
<ugo.galbiati (AT) ebus (DOT) it> wrote:

Quote:
I wrote a TCustomControl descendant. If I put my component in a form with
Align=alClient, when I resize the form my component does flick, because my
form paints gray on my component and the repaint my component.

The form does not repaint over TCustomControl descendants, since they
have a window handle and the form does not paint over child windows.

Try handling the WM_ERASEBKGND message in your custom control. The
default handler clears the control's background. If your paint code
completely covers the control, handle the WM_ERASEBKGND message by
doing nothing and returning 1 to let Windows know the message has been
handled.

---
Yorai Aminov (TeamB)
http://develop.shorterpath.com/yorai
(TeamB cannot answer questions received via email.)

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.