Click to See Complete Forum and Search --> : Win32: redirect windows to offscreen
amirsadig
June 8th, 2006, 06:12 PM
is there any way in windows API to redirect a window to offscreen.
I have heared about Layered Window, but I don't know how can I use them in this case.
I want to begin to some 3D effect for window by capturing its output and put in a texture and display it inside a virtual 3D world (like what Taskgallery do).
I know it is not simple, but the some critical part is capturing of windows to offscreen and getting that image.
any help will be appreciated!
philkr
June 9th, 2006, 05:15 AM
Search for "screenshot" in the FAQ section. You should find some code there to get the desktop into a HBITMAP. The only difference for you will be that you don't use the device context of the whole desktop, but of the particular window you want to capture.
amirsadig
June 9th, 2006, 09:49 AM
I don't just to capture the image of a window, but I want to let windows doesn't render to screen, but rather to that image. this mean the application main window should not be displayed at screen as normal.
what I plan to do is:
-1 redirect the a window redirection to offscreen
-2 create a texture from it and attach it to 3D world which I will create using Opengl. the texture will also be update when the windows paint to the windows
3- also capturing keyboard and mouse event and redirect to application when mouse is over that "texture" in 3D world.
this is a big project, which will be GPL.
Krishnaa
June 9th, 2006, 10:30 AM
All right, looks like a great idea being worked out.
Here is what you can do,
Hook all the drawing API's, whenever you window handle is found in drawing function like LineTo, MoveTo etc. you can redirect the hell to your fake window, Set the original window invisible.
AbRaCaDaBrA....:D :thumb:
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.