🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #6739

Changing Desktop background

#6739
From: Bsisko
Date: Mon, 18 Apr 2005 17:49
21 lines
1722 bytes
     I'm trying to write an application to control the Windows XP desktop!
Specifically speaking, on how to change the background picture on a daily
basis.
    Basically, I have 2 problems:

    1)  I have a book "Win32 Programming API Bible" that instructs me on how
to get a thread for the Desktop, but I get the compiler error "function is
not a member of Application" for GetCurrentThreadID().

I'm using something like this

HDESK hDesktop = GetThreadDesktop( GetCurrentThreadID() )
This will get me the desktop handle:

2.)  Once I got the desktop handle, how do I find out which thread controls
the background image, or Active Desktop function as XP calls it.

Thanks,

Freedom comes when you learn to let go, Creativity comes from when you learn
to say No!   ~  Madonna
Technical Details
Message-ID: <4263f2e9@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!diablo.voicenet.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,18f7396aee5ca768,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Bsisko" <gary.roberson@bluecasa.net>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Changing Desktop background
Date: Mon, 18 Apr 2005 10:49:50 -0700
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 172.198.178.122
Message-ID: <4263f2e9@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1113846505 172.198.178.122 (18 Apr 2005 10:48:25 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!diablo.voicenet.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail