Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Setting the wallpaper

Setting the wallpaper

Scheduled Pinned Locked Moved C / C++ / MFC
javagraphicshelpquestion
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    theCPkid
    wrote on last edited by
    #1

    I am using IActiveDesktop:SetWallpaper function to set the wallpaper. My application generates a bitmap, say D:\image.bmp and then this image is set as wallpaper. The problem is when I edit this image.bmp and call set wallpaper again, the new picture is internally set but is not updated on desktop. I mean to display the new edited picture I need to go to properties->Desktop and then ask windows to load image again. Is there any way to programmatically tell windows to reload the wallpaper image. I guess it just assumes that if path is same, then no need to reload the image?

    the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions. ..surviving in autumn..in love with spring..

    H J 2 Replies Last reply
    0
    • T theCPkid

      I am using IActiveDesktop:SetWallpaper function to set the wallpaper. My application generates a bitmap, say D:\image.bmp and then this image is set as wallpaper. The problem is when I edit this image.bmp and call set wallpaper again, the new picture is internally set but is not updated on desktop. I mean to display the new edited picture I need to go to properties->Desktop and then ask windows to load image again. Is there any way to programmatically tell windows to reload the wallpaper image. I guess it just assumes that if path is same, then no need to reload the image?

      the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions. ..surviving in autumn..in love with spring..

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      I think WallpaperQ: A Wallpaper Management Tool[^] is helpfuls for you.

      T 1 Reply Last reply
      0
      • H Hamid Taebi

        I think WallpaperQ: A Wallpaper Management Tool[^] is helpfuls for you.

        T Offline
        T Offline
        theCPkid
        wrote on last edited by
        #3

        Hey, thanks for the useful link. The link you have given will be helpful to me in many other ways although the problem I had can be solved by passing AD_APPLY_FORCE flag to ApplyChanges function of IActiveDesktop interface. I was using AD_APPLY_ALL but it was not refreshing the desktop.

        the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions. ..surviving in autumn..in love with spring..

        H 1 Reply Last reply
        0
        • T theCPkid

          Hey, thanks for the useful link. The link you have given will be helpful to me in many other ways although the problem I had can be solved by passing AD_APPLY_FORCE flag to ApplyChanges function of IActiveDesktop interface. I was using AD_APPLY_ALL but it was not refreshing the desktop.

          the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions. ..surviving in autumn..in love with spring..

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          I glad my answer was helpful for you. :-D

          1 Reply Last reply
          0
          • T theCPkid

            I am using IActiveDesktop:SetWallpaper function to set the wallpaper. My application generates a bitmap, say D:\image.bmp and then this image is set as wallpaper. The problem is when I edit this image.bmp and call set wallpaper again, the new picture is internally set but is not updated on desktop. I mean to display the new edited picture I need to go to properties->Desktop and then ask windows to load image again. Is there any way to programmatically tell windows to reload the wallpaper image. I guess it just assumes that if path is same, then no need to reload the image?

            the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions. ..surviving in autumn..in love with spring..

            J Offline
            J Offline
            Jijo Raj
            wrote on last edited by
            #5

            You've to call IActiveDesktop::ApplyChanges( AD_APPLY_ALL ). For code snippet just refer this - http://weseetips.com/2008/04/27/how-to-change-the-desktop-wallpaper-programmatically/[^] Regards, Jijo.

            _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

            T 1 Reply Last reply
            0
            • J Jijo Raj

              You've to call IActiveDesktop::ApplyChanges( AD_APPLY_ALL ). For code snippet just refer this - http://weseetips.com/2008/04/27/how-to-change-the-desktop-wallpaper-programmatically/[^] Regards, Jijo.

              _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

              T Offline
              T Offline
              theCPkid
              wrote on last edited by
              #6

              IActiveDesktop::ApplyChanges( AD_APPLY_ALL ) alone wont do. You need to pass AD_APPLY_FORCE function to refresh the same picture. AD_APPLY_ALL do not include AD_APPLY_FORCE. Thanks for your reply.

              the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions. ..surviving in autumn..in love with spring..

              J 1 Reply Last reply
              0
              • T theCPkid

                IActiveDesktop::ApplyChanges( AD_APPLY_ALL ) alone wont do. You need to pass AD_APPLY_FORCE function to refresh the same picture. AD_APPLY_ALL do not include AD_APPLY_FORCE. Thanks for your reply.

                the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions. ..surviving in autumn..in love with spring..

                J Offline
                J Offline
                Jijo Raj
                wrote on last edited by
                #7

                ooh! :doh: Thanks for the info! Regards, Jijo.

                _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups