Jump to content
  • Advertisement
Sign in to follow this  
PBNut

Rendering in another apps client window -

This topic is 4817 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Was wondering if anyone could point me to some samples on how I can render into another programs window. The target program uses directx. Object is to be able to bring up a task bar like windows, but trigger my own task bar to appear when mouse pointer is at the base of the game window. Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
If you mean that the other app is rendering a scene (in D3D), then you need to create a proxy D3D9.dll and place it in the apps folder. YOur D3D9.dll will be loaded at startup instead of the real D3D9.dll, and you can create and return your own derived D3DDevice. Then you can use GetCursorPos() or mouse hooks to keep a track of where the mouse is. When the mouse is at the bottom of the window, you can render your own stuff just before you EndScene().

Because you'll be providing your own implementation od IDirect3DDevice9 (which will mostly just call the real D3D functions), you can render your own stuff when the client app calls EndScene(), because you know that they've finished rendering.

Share this post


Link to post
Share on other sites
Hi there PBNut,
How are you doing?

The Problem
It is definitely possible.

The Solution
A few things I can think of that might cause a problem, You might need the program's source. You also might need to get the program's window handle so that you can create your device.

I would say the following checks might apply.
1) Does this program have an SDK to work with. If so you might be able to create a second device or take advantage of the device that is available.
2) You could get the device of the window and maybe create a child window to this class and maybe work your task bar in that way.


I hope this helps a bit.
I don't know and cannot really find any valid information on the subject.

Share this post


Link to post
Share on other sites
Evil Steve is correct. Here is a proxy dll you can use if you don't want to make your own. Never tested it, but others say it should work ok in many different languages.


http://www.proxy.mikoweb.de/index.php

Hope that helps.
- ØØ -

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!