Newsgroups: comp.windows.ms.programmer
Path: utzoo!utgpu!watserv1!watmath!hyper.hyper.com!bonneau
From: bonneau@hyper.hyper.com (Paul Bonneau)
Subject: Re: Writing to Root window
Message-ID: <1991Jun10.213934.1483@hyper.hyper.com>
Keywords: windows
Reply-To: bonneau@hyper.UUCP (Paul Bonneau,,)
Organization: HyperCube Inc.
References: <216@toshais.UUCP>
Date: Mon, 10 Jun 1991 21:39:34 GMT

In article <216@toshais.UUCP> swonk@toshais.UUCP (Glenn L. Swonk) writes:
>Can anyone suggest a way to write (draw) on the
>root window? Does anyone know how the screen
>saver programs like screenpeace, intermission or
>afterdark work?
>
As for drawing on the desktop (root window):

	HWND	hwndDesk	= GetDeskTopWindow();
	HDC	hdc		= GetDC(hwndDesk);

	/* Draw to your heart's content with the dc. */
	ReleaseDC(hwndDesk, hdc);

cheers - Paul Bonneau.
