Archive: Redraw Desktop


Redraw Desktop
i'm using this script to remove the internet explorer symbol from the desktop (it's not a standard .lnk).

WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" "{871C5380-42A0-1069-A2EA-08002B30309D}" "1"
System::Call 'user32.dll::GetDesktopWindow(v) i .r0'
SendMessage $0 ${WM_SETREDRAW} 1 0

however, the desktop does not get redrawn. only when i press f5 the ie symbol disappears. any clue where the bug is in my code?

Try calling UpdateWindow.


using this, still no result

System::Call 'user32.dll::GetDesktopWindow(v) i .r0'
System::Call 'user32.dll::UpdateWindow(i r0) v r1'

Use NULL window handle
(C) RedrawWindow(NULL, NULL, NULL, RDW_INVALIDATE | RDW_ERASE);


Not works :(
But I found in my old progs how I added hook to desktop listview, following code gets it handle


System::Call 'user32.dll::FindWindowEx(i 0, i 0, t "Progman", i 0) i .r0'
System::Call 'user32.dll::FindWindowEx(i r0, i 0, t "SHELLDLL_DefView", i 0) i .r0'
System::Call 'user32.dll::FindWindowEx(i r0, i 0, t "SysListView32", i 0) i .r0'

Yathosho:

System::Call 'shell32::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'


Takhir:
!define WM_KEYDOWN 0x0100
!define VK_F5 0x74

FindWindow $0 "Progman"
FindWindow $0 "SHELLDLL_DefView" "" $0 0
FindWindow $0 "SysListView32" "" $0 0
SendMessage $0 ${WM_KEYDOWN} ${VK_F5} 0
I try this too, but "0x0100" isn't correct interpreted (most probably as "0x01")

System::Call 'shell32::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'


this alone works, thanks. however, so i can understand this better i have another question. which part of the call addresses the desktop (is it 0x08000000)? can i use the call to redraw other parts, i.e. the start-menu?

0x08000000 is the SHCNE_ASSOCCHANGED flag (from here) and it's essentially forcing the OS to force update the icon cache and re-check any items which should be shown

-daz


i was asking, cause i also plan on changing the startmenu to "classic mode" and change some explorer settings (detail view, show file extensions, etc.). i'd make those changes by changing registry-entries. is any of the above mentioned calls able to apply these settings, so the user does not have to reboot?


Originally posted by Yathosho
System::Call 'shell32::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'


this alone works, thanks.
is there something like this to remove the IE icon from the quick launch too

The icon should be in the $QUICKLAUNCH folder.

i.e.
C:\Documents and Settings\[user_account]\Application Data\Microsoft\Internet Explorer\Quick Launch

-Stu


the problem is, that the icon gets deleted, but still remains in the quicklaunch until i crash+reload the explorer or reboot windows


Can anybody help me with a code to refresh the tray area? When I kill a process it's icon is still present in the tray. I want it to disappear by refresh the tray. Is there a code for this ?


yeah, how about a plugin to redraw several parts of windows? :)


I've searched Google and they all say you have to use Shell_NotifyIcon to delete the tray icon by its handle.

http://msdn.microsoft.com/library/de...notifyicon.asp

-Stu


sorry for the late response, forgot about this since my trip to london.

i was speaking of the quicklaunch, not the tray. this summed up pretty well what i was looking for :p