View Full Version : Strange, but bear with me...
03-12-2001, 08:24 AM
in Windoze, the desktop has a hWnd, right?
Does that mean that you can render OGL to it???
Or is this just REALLY stupid? http://www.opengl.org/discussion_boards/ubb/smile.gif
May seem strange, but this could have a LOT of uses! Anyone want a 3D 'My Computer' icon? http://www.opengl.org/discussion_boards/ubb/cool.gif
03-12-2001, 12:03 PM
intersting idea, but i dont think so. You could run a filter layer over windows, but its just an idea.
uh, i wouldn't dismiss the idea completely. I know nothing about how window's graphics system works, but the X-Windows system has a root window (effectively the desktop), and IT is drawable, so you CAN render stuff to the background. So, it MIGHT be possible to render to the desktop =)
I think this has beed up for discussion before, and I think someone said that the desktop is read-only, or something like that. I.e. you can't render to the desktop, but you can read it.
But I'm no Win32-guru either, so I might be wrong (which I hope I am http://www.opengl.org/discussion_boards/ubb/biggrin.gif ).
03-13-2001, 04:23 AM
GetDesktopWindow() is what you're looking for. I've never tried drawing to the desktop in Win, but I have in Xwindows. Draw to the desktop and hide all child windows, its a great way to get full screen on Linux.
03-13-2001, 04:32 AM
JoeMac: I know 'bout GetDesktopWindow() http://www.opengl.org/discussion_boards/ubb/smile.gif
I've tried it: You can make the desktop the current wgl context, but then the computer seems to lock up, 'though you can still see the cursor & it moves around. Maybe it's just not reciving messages(or responding to 'em), I'll try getting & releasing the desktop, maybe that'll work... if it does, I'll try drawing to it.
03-13-2001, 05:22 AM
Hmmm. Sounds like Bob is right with the read-only comment. Maybe this will work:
call CreateDesktop() with the SECURITY_ATTRIBUTES structure set to what you need, then call SwitchDesktop() to enable your new one. The only problem could come from the defn' of CreateDesktop(). It says 'If the specified desktop already exists, the function succeeds and returns a handle to the existing desktop.' I'm not sure if that refers to any desktop existing or a desktop with those settings existing.
If CreateDT() returns the same handle as GetDT() then you may be out of luck. You could always try DestroyDesktop(), but I imagine that would be offlimits as well. I'm curious to know what you find out either way.
03-13-2001, 05:27 AM
One more thought. If CreateDesktop() returns the current DT, use the return value as the object in SetUserObjectInformation() and pass DF_ALLOWOTHERACCOUNTHOOK in for the USEROBJECTFLAGS param.
03-13-2001, 06:03 AM
JoeMac: Erm...aren't security attributes ignored under Win9x ?
And what's CreateDT? do you mean CreateDC?
I'll get back tomorrow, (hopefully) with results http://www.opengl.org/discussion_boards/ubb/smile.gif
03-13-2001, 06:20 AM
I'm not sure If they're ignored or not. CreateDT is CreateDesktop(). I'm just a lousy (and Lazy) typist. http://www.opengl.org/discussion_boards/ubb/smile.gif
03-14-2001, 06:11 AM
JoeMac: Turns out, all the *Desktop functions are WinNT only. Oh well...
On the bright side: I've got it working!!! http://www.opengl.org/discussion_boards/ubb/smile.gif http://www.opengl.org/discussion_boards/ubb/smile.gif http://www.opengl.org/discussion_boards/ubb/smile.gif
Only...one (slight) catch: it appears that the only way to make this work iis to have the desktop-capturing program be run before ANY other program...& that includes the shell.
So, propably the only practical application for this would be to create an OpenGL shell.
Work goes on...
03-14-2001, 09:46 AM
I am sure that id it ispossible to write to the desk top that someone would have done it before and made a cool 3d interface to windoze. One idea I have quickly thought of is the backdrop or background pic; there may be away to utilise that to do something.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.