Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Changig desktop wallpaper (http://forums.winamp.com/showthread.php?t=253989)

Mattphp 24th August 2006 08:30

Changig desktop wallpaper
 
Hi,

Just trying to change the desktop wallpaper by setting the following reg entries:



WriteRegStr HKCU "Control Panel\Desktop" "ConvertedWallpaper" "$PROGRAMFILES\Waza\waza-1024x768.jpg"
WriteRegStr HKCU "Control Panel\Desktop" "Wallpaper" "$PROGRAMFILES\Waza\waza-1024x768.jpg"
WriteRegStr HKCU "Control Panel\Desktop" "OriginalWallpaper" "$PROGRAMFILES\Waza\waza-1024x768.jpg"
WriteRegStr HKCU "Control Panel\Desktop" "WallpaperStyle" "2"

Well, registry is correctly updated, but the wallpaper does not change. It keeps the old wallpaper.

How can I tell windows to resfresh or to keep the new one ?

Thank you
Matt

PS/ tested on win xp sp2

CancerFace 24th August 2006 16:35

Use SystemParametersInfo from user32.dll to set the wallpaper:
code:
!define SPI_SETDESKWALLPAPER 20
!define SPIF_SENDCHANGE 2
WriteRegStr HKCU "Control Panel\Desktop" "WallpaperStyle" "2"
System::Call 'user32::SystemParametersInfo(i ${SPI_SETDESKWALLPAPER},i 0,t "$PROGRAMFILES\Waza\waza-1024x768.bmp",i ${SPIF_SENDCHANGE})i.r0'


CF


All times are GMT. The time now is 04:12.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.