Dear experts,
My platform is Windows Mobile 6.1.
How do I redirect GDI to draw into a programmer specified off-screen surface
Reason follows:
I want to create something similar to DWM found in Vista.
My goal is to redirect GDI to draw onto my off-screen surface so I can do some processing on it BEFORE I blit it to the primary surface for the user to see.
My current method is to use DirectDraw.
1) Capture the current screen and save it as _dest.
2) Setup DirectDraw to full screen exclusive mode (needed for flipping)
3) Create a complex surface (primary + back surface
4) Copy _dest to the back surface
5) Do a flip on the primary surface
This way, GDI will draw on my back surface, all I have to do is blit it to the primary (front surface) after I've done my processing on the back surface.
This works fine, except one problem.
After step 2, the entire screen will go black (behaviour in exclusive mode) until I do a flip on step 5.
Even though this time interval is very short, from the user experience's point of view, this is not acceptable.
Therefore, please help me on finding out how to redirect GDI for the screen to draw on my off-screen surface.
thanks!
ps. I'm giving more points because I've asked similar question before and did not get any comments.
So this must be a pretty difficult problem.
Start Free Trial