CListCtrl advanced - loading
-
Hi Sometimes, i have a listview which has about 6000 records in it. It can take a while before showing the entire list. Does anyone know how to display a label message or a message 'List is loading .. Please wait' while the list is loading. When the list is shown, message should disappear. Anyone knows a good article about solving this problem. Best regards Jens
-
Hi Sometimes, i have a listview which has about 6000 records in it. It can take a while before showing the entire list. Does anyone know how to display a label message or a message 'List is loading .. Please wait' while the list is loading. When the list is shown, message should disappear. Anyone knows a good article about solving this problem. Best regards Jens
There is an article here on CP that displays a small progress bar while a tree is populated. That might be of use. However you would be better off either trying to improve the load time or using a load on demand technique with a virtual list box. I don't know where your 6000 records are coming from but one would like to think that loading them should be almost instantaneous. Users don't like to wait! Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
-
Hi Sometimes, i have a listview which has about 6000 records in it. It can take a while before showing the entire list. Does anyone know how to display a label message or a message 'List is loading .. Please wait' while the list is loading. When the list is shown, message should disappear. Anyone knows a good article about solving this problem. Best regards Jens
So you are looking for a status dialog or such? I am using Chris Maunders excellent status dialog: http://www.codeproject.com/miscctrl/progresswnd.asp[^] To update dialog controls while processing a big amount of data you should always call a function "Peek And Pump" which processes dialog messages (for example allows the user to click the cancel button of a dialog, without PeekAndPump all controls would be frozen and not reacting). With this dialog you also can show how many items you have processed already. If you don't need the progress bar, just hide it. Shouldn't be that hard. Btw, if you are processing such a large amount of data you should perhaps consider using a virtual list view which is MUCH faster than the normal Windows list view: http://www.codeguru.com/listview/VirtualListControl.html[^] :) -Dominik
_outp(0x64, 0xAD);
and__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? ;) -
So you are looking for a status dialog or such? I am using Chris Maunders excellent status dialog: http://www.codeproject.com/miscctrl/progresswnd.asp[^] To update dialog controls while processing a big amount of data you should always call a function "Peek And Pump" which processes dialog messages (for example allows the user to click the cancel button of a dialog, without PeekAndPump all controls would be frozen and not reacting). With this dialog you also can show how many items you have processed already. If you don't need the progress bar, just hide it. Shouldn't be that hard. Btw, if you are processing such a large amount of data you should perhaps consider using a virtual list view which is MUCH faster than the normal Windows list view: http://www.codeguru.com/listview/VirtualListControl.html[^] :) -Dominik
_outp(0x64, 0xAD);
and__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? ;)yeah i'm currently looking at the 'virtual list view'. I hope i can use it too because i have about 6 columns & all text in the cells. I see the trick is to move all data in an array, and then when windows asks the text, just check which position (subitem) we are talking about & retrieve it from the array. But i think i need to read more of this to understand it better. :) Thanks for the good article. I'm sure it will be usefull. Greetings Jens
-
Hi Sometimes, i have a listview which has about 6000 records in it. It can take a while before showing the entire list. Does anyone know how to display a label message or a message 'List is loading .. Please wait' while the list is loading. When the list is shown, message should disappear. Anyone knows a good article about solving this problem. Best regards Jens
-
Hi Sometimes, i have a listview which has about 6000 records in it. It can take a while before showing the entire list. Does anyone know how to display a label message or a message 'List is loading .. Please wait' while the list is loading. When the list is shown, message should disappear. Anyone knows a good article about solving this problem. Best regards Jens
Why don't you use a virtual listview? This basically means that you only need to load the records currently being displayed.... I don't know off hand of an article on CP for this, but there is documentation in the MSDN...
www.kinkycode.com
99 little bugs in the code, 99 little bugs, Fix 1 bug, recompile.... 101 little bugs in the code... -
Why don't you use a virtual listview? This basically means that you only need to load the records currently being displayed.... I don't know off hand of an article on CP for this, but there is documentation in the MSDN...
www.kinkycode.com
99 little bugs in the code, 99 little bugs, Fix 1 bug, recompile.... 101 little bugs in the code...yeah i'm making my own project now with integration of 'virtual listviews'. :) I've found some good articles on cp & codeguru that explain it pretty good :) I like the idea of only loading what is necessary. Will greatly reduce the wait-time. I'll let you know how much it went faster :) Greetings Jens