PDA

View Full Version : {CreateDC(GetDesktop());} - GLShell



lupine
05-01-2002, 02:40 AM
Note: GetDesktop() should be GetDesktopWindow() - Damn my faulty memory! http://www.opengl.org/discussion_boards/ubb/smile.gif

Hi all - I'm not sure if this post should be in the Beginner or Advanced(beginner coder, advanced topic (: ) forum, but a while back I was doing some research on the idea of using the desktop as an OpenGL window. After some fiddling, I managed to get it working in 9x - the trick being that you have to run the program while the desktop is still uncaptured by an application(ie. the program needs to be shell-status (system.ini, shell=<prog.exe> ). Anyway, I've decided - eventually - to take it a bit further; not sure how much further yet http://www.opengl.org/discussion_boards/ubb/smile.gif. Perhaps just a new shell(probably), perhaps a new windowing system in OGL for Windows (CreateOGLWindow()) http://www.opengl.org/discussion_boards/ubb/smile.gif. But, since the 9x architecture is - according to Micro$oft$haft - obsolete these days, and is now promoting the NT+ line, ME, 2K, etc, etc, so on and so forth - all of which I have a severe phobia to http://www.opengl.org/discussion_boards/ubb/smile.gif - I was wondering if anyone could try creating the desktop as an OGL DC for me, and tell me how it works... if you like, I can email you the program/code I've been using to test the concept on my 9x system. Ask on here, or email me (lupine_NickT@hotmail.com), & I'll send it. If not, then all you need to do is, basically, what I wrote in the subject line http://www.opengl.org/discussion_boards/ubb/smile.gif. Use the Desktop's HWND to get the DC, and run the program as shell. In the NT arch., *that* setting's probably buried in the 50Mb registry, somewhere. So... anyone?

(upd. email addy, GetDesktopWindow())


[This message has been edited by lupine (edited 05-01-2002).]

davepermen
05-01-2002, 03:09 AM
no i dont want to test it
just wanted to state ME is _NOT_ nt-based, its win98 with the name ME and some features in http://www.opengl.org/discussion_boards/ubb/wink.gif (and some new bugs)

and my registry is _NOT_ 50mb http://www.opengl.org/discussion_boards/ubb/wink.gif not in 2k and not in XP..

i suggest you should not be scared of the NT-systems, cause they are working great (much bether than winDOS systems for me..)

well.. if you would post a link i would try it possibly, dunno http://www.opengl.org/discussion_boards/ubb/wink.gif

lupine
05-01-2002, 04:47 AM
Whichever, whatever... I'm running 95b, still http://www.opengl.org/discussion_boards/ubb/smile.gif. From 95c & up, I spit upon their code! Mainly due to the IE integration, but there are other reasons. And the TCP stack problems with 95b don't affect me much.

Anyway.

I've set up a Yahoo group for this thing...
-- http://groups.yahoo.com/group/GLShell/
--
You're looking at Files->OGL.zip - That's MS VC++ (6) code. I'll add Borland C & (poss. Delphi) versions, and binary when I get the chance, but I'm on a public PC ATM. Don't forget to change the shell= variable, or it simply won't do anything.

lupine
05-01-2002, 05:01 AM
Oh, and also... could anyone tell me if this would have a chance of working in Linux? I've got TurboLinux w/GNOME, so I'll have a go when I get back tonight, but a quick opinion would be nice as I've not coded any windowing apps in Linux yet, so I don't know what expect http://www.opengl.org/discussion_boards/ubb/smile.gif

Elixer
05-01-2002, 07:53 AM
That is a strange way to get access to the desktop, most people just pass the HDC and then get the bitmaps from that, and copy it someplace for use as a texture. (At least I think this is how I did it in the past...don't have access to the code at the moment.)

I have to agree with davepermen on all his points. http://www.opengl.org/discussion_boards/ubb/smile.gif

davepermen
05-01-2002, 08:09 AM
Originally posted by Elixer:
That is a strange way to get access to the desktop, most people just pass the HDC and then get the bitmaps from that, and copy it someplace for use as a texture. (At least I think this is how I did it in the past...don't have access to the code at the moment.)

I have to agree with davepermen on all his points. http://www.opengl.org/discussion_boards/ubb/smile.gif



cool http://www.opengl.org/discussion_boards/ubb/smile.gif

oh, and about the linux.. don't know what you're talkin about.. except if you run a windows-emulator in linux you will not get this to work at all. why should linux use the win32api? http://www.opengl.org/discussion_boards/ubb/smile.gif