Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Strange, but bear with me...

Hybrid View

  1. #1
    Intern Newbie
    Join Date
    Jan 2001
    Location
    Doncaster, S.Yorks, UK
    Posts
    35

    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?

  2. #2
    Junior Member Newbie
    Join Date
    Mar 2001
    Location
    warren pa
    Posts
    17

    Re: Strange, but bear with me...

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

    good luck
    -bobert

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Apr 2000
    Location
    Adelaide, South Australia, Australia
    Posts
    839

    Re: Strange, but bear with me...

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

    cheers,
    John

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    3,115

    Re: Strange, but bear with me...

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

  5. #5
    Intern Contributor
    Join Date
    Dec 2000
    Location
    Halifax, Nova Scotia, Canada
    Posts
    90

    Re: Strange, but bear with me...

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

  6. #6
    Intern Newbie
    Join Date
    Jan 2001
    Location
    Doncaster, S.Yorks, UK
    Posts
    35

    Re: Strange, but bear with me...

    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.

  7. #7
    Intern Contributor
    Join Date
    Dec 2000
    Location
    Halifax, Nova Scotia, Canada
    Posts
    90

    Re: Strange, but bear with me...

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

  8. #8
    Intern Contributor
    Join Date
    Dec 2000
    Location
    Halifax, Nova Scotia, Canada
    Posts
    90

    Re: Strange, but bear with me...

    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.

  9. #9
    Intern Newbie
    Join Date
    Jan 2001
    Location
    Doncaster, S.Yorks, UK
    Posts
    35

    Re: Strange, but bear with me...

    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

  10. #10
    Intern Contributor
    Join Date
    Dec 2000
    Location
    Halifax, Nova Scotia, Canada
    Posts
    90

    Re: Strange, but bear with me...

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •