Results 1 to 6 of 6

Thread: Render to desktop... help!

  1. #1

    Render to desktop... help!

    Hi all!
    I've tried a little time ago to render directly to desktop (handle 0).
    But windows (and DX) ****s me off every time i have tried :roll:

    Is there a "volounteer" to try this thing? :? HELP! How can i initialize DX on desktop surface without crashes? ops:

    It's a cool thing to do. I've seen a realtime 3d desktop and it's very cool... :evil:

    See you!

  2. #2

    Render to desktop... help!

    So, getdc(0) is not a solution. Someone tells to make an activex and activate active desktop to load a page with it (bleah) :x
    I've found this:

    ---cut---
    I would recommend, based on what I know of raw win32, using
    WS_EX_TRANSPARENT when creating your window or something like that. Then
    blitting or drawing on your own space, appearing to have been drawn on
    desktop itself. Something like "colorkeying" your WND. A better way would be
    copying part of desktop area to your buffers (using CreateDC(0)), then
    drawing it together with your stuff. Maybe making the window child of
    desktop... this is actually offtopic discussion.
    ---cut---
    So after some tests,
    using the WS_EX_TRANSPARENT style, and create the window
    as a child of the desktop window, blitting with colorkey
    works fine !
    ---cut---

    Hmm... :?

  3. #3
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    Render to desktop... help!

    GetDC(0) will work if using the standard GDI functions.

    Is there anyway to point a DirectX surface at an already existing Canvas?
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  4. #4

    Render to desktop... help!

    Yes, i tried also getdesktopwindows to get handle to desktop, but no result at all (nothing was rendered) :roll:

    I have seen a 3d desktop software and analized it.

    OH, it's an ACTIVE-X loaded on the desktop with Active Desktop! ARGH!
    But works... :shock:

    I'm now experimenting...

  5. #5

    Render to desktop... help!

    OOOOH! DONE!

    I've a perfect 3D Animated Desktop rendered realtime with a stupid Active-X :?

    Oh, just a little fix... it uses about 100% of my cpu... :roll:

    x Clootie: i've used the RUN loop in D3DAPP, but it seems not to leave enough idle time to other processes. How can i do? The other software i tried (Desktop Dreamscapes 3D) uses cpu only when no other processes request for it. By now, this is [OT] in this thread.

    Thanks for help.

  6. #6

    Render to desktop... help!

    You can do something like this:
    [pascal][background=#FFFFFF][normal=#000000][number=#0000FF][string=#0000FF][comment=#248F24][reserved=#000000]
    while Running do
    ...
    // Update and render a frame
    if fMyApp.m_bActive then
    begin
    fMyApp.CheckForLostFullscreen;
    fMyApp.Render3DEnvironment;
    if (strStatsPrev <> fMyApp.m_strFrameStats) then
    StatusBar.Panels[0].Text:= fMyApp.m_strFrameStats;
    end;
    ...
    Sleep(fMilliseconds); // fMilliseconds - can/should be dynamically changed so frame rate is fixed.
    end;[/pascal]

    Basically call "// Update and render a frame" block fixed count per second. And how often to call is your decision. Good realization example is something like TDXTimer from DelphiX.
    There are only 10 types of people in this world; those who understand binary and those who don't.

Bookmarks

Posting Permissions

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