Old 10th June 2005, 11:06   #1
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,362
Redraw Desktop

i'm using this script to remove the internet explorer symbol from the desktop (it's not a standard .lnk).
code:
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?
Yathosho is offline   Reply With Quote
Old 10th June 2005, 11:21   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Try calling UpdateWindow.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 10th June 2005, 14:33   #3
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,362
using this, still no result
code:
System::Call 'user32.dll::GetDesktopWindow(v) i .r0'
System::Call 'user32.dll::UpdateWindow(i r0) v r1'

Yathosho is offline   Reply With Quote
Old 10th June 2005, 17:54   #4
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
Use NULL window handle
(C) RedrawWindow(NULL, NULL, NULL, RDW_INVALIDATE | RDW_ERASE);
Takhir is offline   Reply With Quote
Old 10th June 2005, 18:54   #5
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
Not works
But I found in my old progs how I added hook to desktop listview, following code gets it handle
code:

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'

Takhir is offline   Reply With Quote
Old 10th June 2005, 20:51   #6
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Yathosho:
code:
System::Call 'shell32::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'


Takhir:
code:
!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")
Instructor is offline   Reply With Quote
Old 11th June 2005, 03:11   #7
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,362
code:
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?
Yathosho is offline   Reply With Quote
Old 11th June 2005, 09:37   #8
DrO
 
Join Date: Sep 2003
Posts: 27,873
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
DrO is offline   Reply With Quote
Old 11th June 2005, 11:14   #9
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,362
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?
Yathosho is offline   Reply With Quote
Old 11th August 2005, 11:12   #10
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,362
Quote:
Originally posted by Yathosho
code:
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
Yathosho is offline   Reply With Quote
Old 11th August 2005, 12:59   #11
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
The icon should be in the $QUICKLAUNCH folder.

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

-Stu
Afrow UK is offline   Reply With Quote
Old 11th August 2005, 16:15   #12
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,362
the problem is, that the icon gets deleted, but still remains in the quicklaunch until i crash+reload the explorer or reboot windows
Yathosho is offline   Reply With Quote
Old 12th August 2005, 06:33   #13
Chilli24
Member
 
Chilli24's Avatar
 
Join Date: Jan 2005
Location: Seattle, WA
Posts: 66
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 ?
Chilli24 is offline   Reply With Quote
Old 12th August 2005, 07:46   #14
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,362
yeah, how about a plugin to redraw several parts of windows?
Yathosho is offline   Reply With Quote
Old 12th August 2005, 10:55   #15
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 8th September 2005, 23:20   #16
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,362
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
Yathosho is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump