From: Erick Engelke on

In my program I'd like to force the background to a straight colour, like
RDP. But I don't want to write over the user's settings, in case my
program can't restore it.. i.e. if the machine crashes.

Is there a way tell Windows to temporarily use a blank background without
overwriting the the user's settings.

Erick

Erick Engelke erick(a)uwaterloo.ca
Director PHY-3013
Engineering Computing (519) 885-1211 x35893
University of Waterloo http://www.eng.uwaterloo.ca/~erick

From: Alex Blekhman on
On 10-Jun-10 23:17, Erick Engelke wrote:
>
> In my program I'd like to force the background to a straight colour,
> like RDP. But I don't want to write over the user's settings, in case my
> program can't restore it.. i.e. if the machine crashes.

You need to specify a bit more of info about your program. Basically,
you need to handle either WM_PAINT message or WM_ERASEBKGND message. Or
both. It depends on how your program implements painting.

See here for more info:

"Window Background (Windows)"
http://msdn.microsoft.com/en-us/lib​rary/dd145204(VS.85).aspx

"Drawing a Custom Window Background"
http://msdn.microsoft.com/en-us/library/dd162482(VS.85).aspx

KB103786 - How To Change Window Background Color with Foundation Classes
http://support.microsoft.com/kb/103786

HTH
Alex
From: Erick Engelke on


On Sat, 12 Jun 2010, Alex Blekhman wrote:

> On 10-Jun-10 23:17, Erick Engelke wrote:
>>
>> In my program I'd like to force the background to a straight colour,
>> like RDP. But I don't want to write over the user's settings, in case my
>> program can't restore it.. i.e. if the machine crashes.
>
> You need to specify a bit more of info about your program.

Okay. You were writing about the background of a Window, I'm talking
about the Windows Session's background wallpaper.

I am compressing and broadcasting the complete screen to nearby computers
in the classroom. The session background screen means there is more data
to compress.

In a simple world, I would set the screen background to a solid colour, so
I don't have to compress all that background, which just slows me down.

But I don't want to leave my 'temporarily simple' background in place when
my user program exits. I'm wonderring if there is a way to

The RDP server go to a simple background does when you connectremotely,
and returns to your normal background when you reconnect locally. That's
what I want to do.

Erick
From: Jongware on
On 14-Jun-10 20:12 PM, Erick Engelke wrote:
>
>
> On Sat, 12 Jun 2010, Alex Blekhman wrote:
>
>> On 10-Jun-10 23:17, Erick Engelke wrote:
>>>
>>> In my program I'd like to force the background to a straight colour,
>>> like RDP. But I don't want to write over the user's settings, in case my
>>> program can't restore it.. i.e. if the machine crashes.
>>
>> You need to specify a bit more of info about your program.
>
> Okay. You were writing about the background of a Window, I'm talking
> about the Windows Session's background wallpaper.
>
> I am compressing and broadcasting the complete screen to nearby
> computers in the classroom. The session background screen means there is
> more data to compress.
>
> In a simple world, I would set the screen background to a solid colour,
> so I don't have to compress all that background, which just slows me down.
>
> But I don't want to leave my 'temporarily simple' background in place
> when my user program exits. I'm wonderring if there is a way to
>
> The RDP server go to a simple background does when you connectremotely,
> and returns to your normal background when you reconnect locally. That's
> what I want to do.

It might be as easy as creating a full screen window and putting that on
the bottom of the window stack.

[Jw]
From: Alex Blekhman on
On 15-Jun-10 4:12, Erick Engelke wrote:
> Okay. You were writing about the background of a Window, I'm talking
> about the Windows Session's background wallpaper.

In addition to my other answer. If you need to change the desktop
window's background color rather than changing the wallpaper, the there
is SetSysColors function with COLOR_DESKTOP element code.

HTH
Alex