Strange, but bear with me...

in Windoze, the desktop has a hWnd, right?
Does that mean that you can render OGL to it???
Or is this just REALLY stupid?

May seem strange, but this could have a LOT of uses! Anyone want a 3D ‘My Computer’ icon?

intersting idea, but i dont think so. You could run a filter layer over windows, but its just an idea.

good luck

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 ).

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.

JoeMac: I know 'bout GetDesktopWindow()

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.

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.

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.

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

I’m not sure If they’re ignored or not. CreateDT is CreateDesktop(). I’m just a lousy (and Lazy) typist.

JoeMac: Turns out, all the *Desktop functions are WinNT only. Oh well…

On the bright side: I’ve got it working!!!

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…

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.