I use Shell COM methods - IShellFolder::EnumObjects, Also i admit that yes i havn't done the WM_SETREDRAW. OK the CPU is a 500 MHz that i tested this on. I am using a diffrent pc at the moment and i was recalling some of my problems that i have encountered while trying to do it last year. As i am attempting to do the same now - i reconed that i might ask before i stuffup again. Secondly you look to be using MFC, well honestly i neva graspt it and so i am stuck with SDK although i played around with ATL. Note this test was run in debuggin' mode so yes i guess the value is somewhot inapropiate (found out later with another app that there is a diffrence).

::Other things done
- i am obtaining the icons of the shell objects through Shell COM. (use IExtractIcon when IShellIcon failes)
- i am using the LPARAM to keep the values returned of each individual item from IShellFolder::GetAttributesOf to use for icon display and capability checks.
- Sorting the items after the IShellFolder::EnumObjects is returned. (i must admit that i didn't first cache them and that i know it my greatest mistake cause i could sort them in memory or rather add them to the listview in the order that suits me.) this is where i had the most time spent on

So i was getting rather fedup after doing this for the 4th time that i though i'll rather ask then be diapointed again.

PS - everything that i know of programming is what i have picked up from here or there...

Using Shell COM Methods to make a seemless transaction from the desktop to the disk and viseversa.

{comapring that value to what explorer gets...}

Well thank you.
Black iCE

I only used MFC in that quick and dirty test app to get the base project (so I wouldn't have to write any code). The only code I added was the stuff to use FindFirst/FindNext, etc (which isn't MFC at all but just straight windows API calls).

Hehe, every task you acheive (wether it is the first time or the fifth time) is more knowledge that you learn and every time you do it again, you'll find better ways of doing it. Just keep at it!!!

Posted on 2004-08-08 16:54:49 by Relvinian
If the icon extraction is taking a lot of time, cache the icons - keep a hash table of file name (including path) and associate it with icon data. Do build that in the background.

Do a setitemcount as well as disable redraw, while you're adding items. Virtual listview shouldn't *really* be necessary, but it's often very easy to implement, and will cause less memory usage... so you'll probably want to go for it.
Posted on 2004-08-08 16:56:12 by f0dder
This i why i Really appricaite this form and it's members!!!

I have been handed the advice of others that i no-doubt know will help me. Thank you all - Relvinian and f0dder especially for the details and taking some time to reply and help a misguided person out:alright:

right got it:
- Virtual not nessary... ok so there goes the topic :grin:
- SetItemCount + SetReDraw a must
- Threading of visual aspects and maybe subdirectory counts (4 SetItemCount)

Thank you all. :alright:

Black iCE
Posted on 2004-08-08 17:04:43 by Black iCE
Hi BlackICE,

Since you are using shellobjects why not use the shells icon cache instead of worrying about your own. That way you are sure to get the associated icons and what ever is current if the user changes them while your program is running. For an example of how to use the system icon cache check out my WinExplorer demo somewhere on this board.

Posted on 2004-08-08 17:42:18 by donkey
Hey donkey, did a search on it and it truned up nothing... is it on your site :)

and he adds the links as i post this lol

Thank you
Black iCE
Posted on 2004-08-08 17:46:32 by Black iCE

I think i do use the shell icon cache... by using SHGetFileInfo... right and return the ImageList to the ListView?
Posted on 2004-08-08 17:49:16 by Black iCE
Ok i am gonna chew ova your demo for a while... i question : it also seems to take some time to enumerate the contents of the system32 directory.

But after trying the same directory three time - seems like the system cahes the directory too
Posted on 2004-08-08 17:56:13 by Black iCE
Hi BlackiCE,

Well, it was never meant to be anything but a way to test a few things to help someone out so I never bothered much with it. I just expanded it a bit as I needed to find something out that involved file information and Windows in general, other than that it was not meant to be a practical application.
Posted on 2004-08-08 18:06:03 by donkey
ok well this is an excellent reference for me. just one question... ordinals?? So you are calling functions stright from the dll. Ok so that is why i had so much shortcomings in trying to use the MASM32 package... i didn't use them nor do i know how to.

and then coming accross f0dder's explanation i see why i should be careful...
Posted on 2004-08-08 18:09:23 by Black iCE