Changing the desktop wallpaper?

This is a discussion on Changing the desktop wallpaper? within the Windows Programming forums, part of the Platform Specific Boards category; I've tried: Code: string ft = "C:\test.bmp"; SystemParametersInfo(SPI_SETDESKWALLPAPER, NULL, ft, SPIF_SENDCHANGE) but that just changes my desktop to black....

  1. #1
    Registered User
    Join Date
    Jul 2005
    Posts
    22

    Changing the desktop wallpaper?

    I've tried:

    Code:
    string ft = "C:\\test.bmp";
    SystemParametersInfo(SPI_SETDESKWALLPAPER, NULL, ft, SPIF_SENDCHANGE)
    but that just changes my desktop to black.

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    Code:
    SystemParametersInfo(SPI_SETDESKWALLPAPER, NULL, ft.c_str(), SPIF_SENDCHANGE);
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  3. #3
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    I prefer using the ActiveDesktop interfaces. You can do more with them

    SystemParametersInfo

  4. #4
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    yeah SPI only works for .bmp
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Desktop Wallpaper - Animated Tiff
    By Rune Hunter in forum C# Programming
    Replies: 3
    Last Post: 02-08-2008, 06:59 PM
  2. changing desktop wallpaper
    By -11Reaper11- in forum C++ Programming
    Replies: 7
    Last Post: 08-09-2006, 04:35 AM
  3. Showing Desktop SW_DEFAULT
    By Yuri in forum Windows Programming
    Replies: 6
    Last Post: 11-20-2005, 01:28 PM
  4. Sticky wallpaper!
    By SMurf in forum Windows Programming
    Replies: 4
    Last Post: 02-21-2003, 12:34 PM
  5. changing the desktop background c++
    By v0id in forum Windows Programming
    Replies: 1
    Last Post: 02-21-2002, 08:03 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21