By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,652 Members | 1,697 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,652 IT Pros & Developers. It's quick & easy.

Could not refresh the Tree View of Windows Explorer

P: 7
Could anyone help me?
After updating icon for a drive, for example C drive by specifying icon file at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Explorer\DriveIcons\C\DefaultIcon, I want to refresh at Windows Explorer and below is processing flow:
- Read a metrics value, for example "Shell Icon Size" at HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics
- Decrease icon size by 1
- SendMessage(HWND_BROADCAST, WM_COMMAND, 106597, 0);
- Increase icon size by 1 (back to original value)
- SendMessage(HWND_BROADCAST, WM_COMMAND, 106597, 0);

I checked on both Win2K & XP, below is result:
- On Win2K, icon of C drive is updated on both List view & Tree view (right & left panels of Windows Explorer)
- On WinXP, icon of C drive is updated only on List view & Tree view (right panel of Windows Explorer). How to solve this problem?

Many thanks,
Mar 4 '07 #1
Share this Question
Share on Google+
4 Replies


P: 7
There is 1 more important point:
- I select "My Computer" and collapse it (to hide C drive) then perform refreshing (as my previous post). After that, expand "My Computer" again, the icon is updated (of-couse I mean on WinXP).

Please help me!
Mar 4 '07 #2

DeMan
100+
P: 1,806
I'm not sure I quite follow, do you mean you press F5 to refresh and then get an error?
Mar 4 '07 #3

P: 7
Thanks DeMan for your reply.
I could solve this problem now. I used SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE...) instead of sending WM_COMMAND. By using this, drive icons will be updated on both tree view & list view.
Mar 5 '07 #4

P: 7
Sorry for a bit further question.

Now in 32bit environment, If I update icon information, for example:
- Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Explorer\DriveIcons\C\DefaultIcon
- Set default value = C:\Windows\System32\Shell32.dll,12

the icon of C drive will be changed.
Now I want to support this feature on 64bit environment. I dont know if I update above key, the drive icon will be updated or not (event WOW64 will update another key actually). If you know, please help me about this (sorry because I dont have any 64bit environment simulator).

Many thanks for your help!
Mar 5 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.