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 

Resize - Repaint???

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
Camiel Wijffels
Guest





PostPosted: Thu Jul 17, 2003 8:42 pm    Post subject: Resize - Repaint??? Reply with quote



Hi there,
I wonder, when I resize a form to a larger size, the form is repainted
without any events being triggered. When picking the bottom-right corner of
the window, and enlarging the window, all controls stay exactly where they
should be, aligned to the top-left corner (when not using anchors or
alignment). But when picking up the top-left corner of the window, and
enlarging the window, all controls suddenly move according to the resizing
(again when not using anchors or alignment). And they do this without
flicker. However, when I have, for example, a statusbar on the bottom-edge
of my window, this one flickers - just for a few millseconds. This is caused
by moving the entire window, according to the top-left resize operation, and
only AFTER this redraw has taken place, the system realizes that the
statusbar should be at the bottom, so repainting it!
WHY?
Is the on-screen movement so fast that no one can see? Cause when I copy a
bitmap on my machine to the screen, I see a few flickers - this takes
approximatly 25 ms on my machine (666 MHz, 1000x1000x16)
If the on-screen movement is so fast, why dont I use the same technique?
What API calls do I have to dive into to know what is going on?
--
Met vriendelijke groet, Camiel Wijffels
===============================================
Vertrouwelijk. Dit bericht is uitsluitend bestemd voor de geadresseerde.
Confidential. This message is ment for the addressed recipient only.
===============================================


Back to top
Tomaz Koritnik
Guest





PostPosted: Thu Jul 17, 2003 9:19 pm    Post subject: Re: Resize - Repaint??? Reply with quote



Hi

Some controls are not written properly and they don't handle paint
messages the right way. Usually this is caused by processing WM_ERASEBKGND
message but some controls may erase background on WM_PAINT message. If this
control is not double-buffered then background is first painted and then the
contents of the control which causes flickering. I don't know what do you
mean in the example with status bar. Can you describe it more clearly.

regards,
Tomaz,


"Camiel Wijffels" <C.Wijffels (AT) BluePrintST (DOT) com> wrote

Quote:
Hi there,
I wonder, when I resize a form to a larger size, the form is repainted
without any events being triggered. When picking the bottom-right corner
of
the window, and enlarging the window, all controls stay exactly where they
should be, aligned to the top-left corner (when not using anchors or
alignment). But when picking up the top-left corner of the window, and
enlarging the window, all controls suddenly move according to the resizing
(again when not using anchors or alignment). And they do this without
flicker. However, when I have, for example, a statusbar on the
bottom-edge
of my window, this one flickers - just for a few millseconds. This is
caused
by moving the entire window, according to the top-left resize operation,
and
only AFTER this redraw has taken place, the system realizes that the
statusbar should be at the bottom, so repainting it!
WHY?
Is the on-screen movement so fast that no one can see? Cause when I copy a
bitmap on my machine to the screen, I see a few flickers - this takes
approximatly 25 ms on my machine (666 MHz, 1000x1000x16)
If the on-screen movement is so fast, why dont I use the same technique?
What API calls do I have to dive into to know what is going on?
--
Met vriendelijke groet, Camiel Wijffels
===============================================
Vertrouwelijk. Dit bericht is uitsluitend bestemd voor de geadresseerde.
Confidential. This message is ment for the addressed recipient only.
===============================================





Back to top
Camiel Wijffels
Guest





PostPosted: Fri Jul 18, 2003 8:30 am    Post subject: Re: Resize - Repaint??? Reply with quote



Take a slow machine, ie 100 MHz. Start wordpad and resize the top-size of
the wordpad main form. You see what I mean?
--
Met vriendelijke groet, Camiel Wijffels
===============================================
Vertrouwelijk. Dit bericht is uitsluitend bestemd voor de geadresseerde.
Confidential. This message is ment for the addressed recipient only.
===============================================
.. I don't know what do you
Quote:
mean in the example with status bar. Can you describe it more clearly.

regards,
Tomaz,


However, when I have, for example, a statusbar on the
bottom-edge
of my window, this one flickers - just for a few millseconds. This is
caused
by moving the entire window, according to the top-left resize operation,
and
only AFTER this redraw has taken place, the system realizes that the
statusbar should be at the bottom, so repainting it!




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics 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.