0

I am using a Full Screen application that is using DirectDraw functions for display and it is working fine. Now I want to show another application with its own window but the other application is hidden behind the full screen Direct Draw application when launched. I can access the other application only when I close the directdraw full screen application.

Is it possible to switch to another application from a direct draw full screen application while running? Is there any way we can display the other application’s window on top of the full screen DirectDraw function and then resume back once the other window is closed?

Thanks and regards

AndroidDev
  • 5,193
  • 5
  • 37
  • 68

1 Answers1

1

I looked into this some time ago and found that the way its done is to hook the DirectDraw APIs and insert your own rendering in there. Basically, after the other app is done drawing the scene and is about to present the backbuffer, your code jumps in and does its own thing. I never got it working myself, but that seems to be the approach. I don't think there's any 'easy' way to do it though.

One other option would be to see if the other app can run in fullscreen windowed mode. Basically, no borders, filling the whole screen, but not technically fullscreen/exclusive mode. If it supports that, then you can make a topmost window which will display over top of it.

Nerdtron
  • 1,486
  • 19
  • 32
  • Sorry I forgot to mention that the other application doesn't use DirectDraw, it uses regular GDI calls. Any idea if the above is possible if the other application creates a normal window or displays a Message box? Right now those are hidden behind the first application. – AndroidDev Oct 31 '11 at 12:06
  • If its just using a fullscreen window with GDI calls, then try making your window topmost. See http://msdn.microsoft.com/en-us/library/windows/desktop/ms633545(v=vs.85).aspx for the SetWindowPos call. You can provide an argument there to make your window "topmost" and it'll show on top of the fullscreen window. – Nerdtron Oct 31 '11 at 19:12
  • @Nerdton, I tried the SetWindowPos and other APIs but still I cant see the other window. As long as the first application (using DirectDraw) is full screen, I cant see the other application window (using GDI) – AndroidDev Nov 02 '11 at 16:12
  • you said in your earlier comment that the other application doesn't use DirectDraw. now you're saying it does. The SetWindowPos with "topmost" will work if its a regular GDI window that happens to be fullscreen. If the app is a DirectX exclusive full screen app, then SetWindowPos won't work and then you get into what I mentioned earlier and having to do DLL injection and API hooking to get your draw code inserted in that other application. – Nerdtron Nov 03 '11 at 18:06