Board index » cppbuilder » Preventing VCL Components from updating

Preventing VCL Components from updating


2007-02-24 04:54:52 AM
cppbuilder69
Basic question.
I have a VCL object, TStringGrid, that I want to apply a number of
changes to, but I don't want to see the screen flicker. Or in
otherwords, I want all my changes made, and then the screen redrawn.
I can accomplish that to some extent by setting Visible to false and ,
doing all the updates, and then setting it to true, but that does cause
the screen to become invisible briefly.
Is there a better way that doesn't make the component invisible, and
thus flicker?
 
 

Re:Preventing VCL Components from updating

"Dan" < XXXX@XXXXX.COM >wrote in message
Quote
Is there a better way that doesn't make the component invisible,
and thus flicker?
Send a WM_SETREDRAW message with its wParam set to FALSE to the grid's
HWND before making the update, and then send it again with wParam set
to TRUE afterwards.
Gambit
 

Re:Preventing VCL Components from updating

Remy Lebeau (TeamB) wrote:
Quote
"Dan" < XXXX@XXXXX.COM >wrote in message
news:45df54b7$ XXXX@XXXXX.COM ...

>Is there a better way that doesn't make the component invisible,
>and thus flicker?

Send a WM_SETREDRAW message with its wParam set to FALSE to the grid's
HWND before making the update, and then send it again with wParam set
to TRUE afterwards.


Gambit


Thanks
 

{smallsort}

Re:Preventing VCL Components from updating

Quote
>
>Send a WM_SETREDRAW message with its wParam set to FALSE to the grid's
>HWND before making the update, and then send it again with wParam set
>to TRUE afterwards.
I had done this in an app and found that I needed to force a repaint
after send the TRUE.
DC