Hi all
I have a question about the ListView component. I use a ListView component to show some information about processes in my app and I need to update its contents at the interval of at least 1 second. It really worked very well just with a minor problem, that's when update the contents, the item that need to be changed will flicker. It's not very good I think. And I have tried some method, for example, using LockWindowUpdate before updating and using it again with parameters NULL after updating, but it was no use. Do you have any idea about it? Any idea will be appreciated.
Posted on 2004-10-17 01:55:00 by Rey
What is flickering? The item that is selected? Then you should store the selected item in a var. while updating, and after that select it again.
Dominik
Posted on 2004-10-17 08:30:12 by Dom
First of all, thank you for your repay,Dom.
It seems that i did not make me understood very well.What i want to say is that i have a ListView conponent in my app,because i want to show some infomation about the processes.(like the Task Manager in 2000/XP).
So I need to update the processes infomation at the interval of 1 seconds.
but while updating, the items that need to be changed will flicker.It seems that the ListView conponment is repainting itself,especially updating some itmes that is next to each other.I am expecting your reply.Thanks in advance. :oops:
Posted on 2004-10-20 06:45:27 by Rey
First of all, thank you for your repay,Dom.
It seems that i did not make me understood very well.What i want to say is that i have a ListView conponent in my app,because i want to show some infomation about the processes.(like the Task Manager in 2000/XP).
So I need to update the processes infomation at the interval of 1 seconds.
but while updating, the items that need to be changed will flicker.It seems that the ListView conponment is repainting itself,especially updating some itmes that is next to each other.I am expecting your reply.Thanks in advance. :oops:
Posted on 2004-10-20 06:46:55 by Rey
Could you post the source? I wrote several simple tools that used ListView and listed some system info, i.e. the tcp connections, but I never had your problem. Let me see the code and I will see what I can do for ya.
Dominik
Posted on 2004-10-20 07:13:55 by Dom
Rey,

Try this API:

	invoke	SendMessage, hList, WM_SETREDRAW, FALSE, NULL

;
;Update code here
;
invoke SendMessage, hList, WM_SETREDRAW, TRUE, NULL


They might work!

hth

farrier
Posted on 2004-10-20 07:53:36 by farrier
Hi,Dom.Because my app was written in BCB6(Borland C++ Builder),i dont know whether i am allowered to post it here ?
Hello farrier,nice to meet you here. I will try what you have posted. And I think you code probably will work. Thanks.
Posted on 2004-10-22 06:55:19 by Rey