Thread View: comp.os.ms-windows.programmer.graphics
3 messages
3 total messages
Started by Khedron
Wed, 09 Aug 1995 20:06
objects behind windows
Author: Khedron
Date: Wed, 09 Aug 1995 20:06
Date: Wed, 09 Aug 1995 20:06
8 lines
828 bytes
828 bytes
I want to know how to do graphics in Windows that will not be confined to a specific window, but can float around the desktop and hide behind windows. My goal is to write my own version of x-roaches for Windows, just for my own personal amusement. What resources are recommended, and where do I start? Michael
Re: objects behind windows
Author: mag
Date: Thu, 10 Aug 1995 07:14
Date: Thu, 10 Aug 1995 07:14
30 lines
1368 bytes
1368 bytes
In article <DD27up.8yx@midway.uchicago.edu>, mrh3@woodlawn.uchicago.edu
(Khedron)says...
>
> I want to know how to do graphics in Windows that will not be confined
>to a specific window, but can float around the desktop and hide behind
>windows. My goal is to write my own version of x-roaches for Windows,
>just for my own personal amusement.
>
> What resources are recommended, and where do I start?
>
> Michael
>
You can say
{
HDC hdcScreen;
if ((NULL == (hdcScreen = GetDC(NULL)))
{
// Error handling
}
// at this point hdcScreen is the handle to the Device Context fro the
// entire screen.
Then you can do whatever you do with the screen.
--
MAG
/* ********************************************************
To understand recursion one must first understand recursion
******************************************************** */
Re: objects behind windows
Author: Alex W. Rogoyski
Date: Fri, 11 Aug 1995 23:17
Date: Fri, 11 Aug 1995 23:17
20 lines
1368 bytes
1368 bytes
mrh3@woodlawn.uchicago.edu (Khedron) wrote: > I want to know how to do graphics in Windows that will not be confined >to a specific window, but can float around the desktop and hide behind >windows. My goal is to write my own version of x-roaches for Windows, >just for my own personal amusement. > > What resources are recommended, and where do I start? > > Michael > You could use GetDC(NULL) to get a HDC to the screen. There is a function to get a list of all visible windows but I can't remember the name. The function returns a HWND and it is called something like GetWindow. Then you could use GetWindowRect to get the boundaries or each window. It would be a little complicated but with that info you should be able to write your own version of x-roaches. Have a nice day, Alex W. Rogoyski
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads