Advertisement

10.07.2008 at 07:43PM PDT, ID: 23796061 | Points: 500
[x]
Attachment Details

Redirect GDI to draw on programmer defined surface

Asked by fungi8210 in Windows Programming, DirectX Graphics & Game Programming, Windows Mobile (Pocket PC / Win CE) Operating Systems

Tags:

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
[+][-]10.08.2008 at 02:45PM PDT, ID: 22673828

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.08.2008 at 08:00PM PDT, ID: 22675383

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.10.2008 at 02:06PM PDT, ID: 22690792

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.04.2008 at 10:03AM PST, ID: 22878748

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628