Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
change wallpaper or background in windows
#1
how do i change the desktop wallpaper with qm ? i have been searching the forum but cant seem to find anything about it


thanks
#2
Code:
Copy      Help
SystemParametersInfo SPI_SETDESKWALLPAPER 0 _s.expandpath("$commonpictures$\Sample Pictures\Forest.jpg") 3 ;;change
5
SystemParametersInfo SPI_SETDESKWALLPAPER 0 "" 3 ;;remove
5
SystemParametersInfo SPI_SETDESKWALLPAPER 0 SETWALLPAPER_DEFAULT 3 ;;should restore default, but does not work on my computer

SPI_SETDESKWALLPAPER is 20
SETWALLPAPER_DEFAULT is -1

If gives 'unknown identifier' error (it may be in older QM versons), change these SPI_... constants to these values.

Works on all OS. (Edit: must be bmp file on XP).
#3
ok iv done some looking around on the internet and i found that this code will only work with .bmp in xp, vista can use both .jpg and bmp

Code:
Copy      Help
str sPath  =  "C:\Users\Administrator\Pictures\Internet Explorer Wallpaper.bmp"

SystemParametersInfo SPI_SETDESKWALLPAPER 0 _s.expandpath(sPath) SPIF_UPDATEINIFILE|SPIF_SENDWININICHANGE


that seems to be what works best but in xp i cant use jpg Sad how would i convert jpg or other image formats to bmp (with QM)?.
#4
Try something like this:

Code:
Copy      Help
int b=LoadPictureFile(pathofjpgorgif 0)
SaveBitmap(b pathofbmp)
DeleteObject(b)

Or search the forum for gflax.
#5
that worked great thanks so much


Forum Jump:


Users browsing this thread: 2 Guest(s)