Asked by:
GDI animation and DWM

Question
-
I wrote a card playing game using GDI BitBlt with double buffering to avoid flicker, that has worked fine through all versions of Windows up until DWM (Desktop Window Manager) was introduced. Now with DWM (particulally 'Desktop Composition') enabled the cards appear to be missing a large chunk of the leading edge as they move around the screen. I single stepped through the code in the debugger to ensure that a card is moved from one position to the next in a single BitBlt operation. If I disable 'Desktop Composition' it works fine. I can only assume that DWM is reading from the buffer at some point in the middle of the BitBlt operation. I have hunted around to try and find any way of synchronizing the BitBlt and DWM but to no avail. Is there any current solution, or is there likely to be a solution in the future so that GDI based programs that have animation do not have to be completely rewritten?
- Moved by Jack Zhai-MSFTMicrosoft contingent staff Thursday, March 6, 2014 1:43 AM Not the VS General issue.
Thursday, February 20, 2014 5:08 PM
All replies
-
Hi David,
Based on your description, I’m afraid that it is not the correct forum for this issue, since this forum is to discuss:
Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor.
You said that it is related to the GDI BitBlt and Games, is it related to the Directx or the XNA? If so, maybe you could get better support here:
http://xboxforums.create.msdn.com/forums/
Best Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- Edited by Jack Zhai-MSFTMicrosoft contingent staff Monday, February 24, 2014 8:33 AM
Monday, February 24, 2014 8:33 AM -
Hi,
You've lost me. I don't know what WPF/SL or XNA stand for. My program was written originally in Visual Studio 6 using MFC and has been ported up to Visual Studio 2012 and only uses MFC mixed with some low level Windows API calls and straightforward GDI calls to draw to a window.
I don't understand why you say this forum is to discuss "Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor" when it's clearly labelled "Visual Studio Development forums>Visual Studio General Questions" at the top.
It seems doubtful that I would get any help whatsoever from an 'xboxforum', when the issue is related to a program written in Visual Studio that runs under Windows and the problem has been caused by Microsoft adding the additional layer of buffering that is called 'Desktop Composition'. The program ran fine all the way up to Windows XP and still runs correctly if you disable 'Desktop Composition'. Obviously I didn't explain the problem well enough.
Monday, February 24, 2014 11:13 AM -
If it is the MFC app, the VC++ forum is the correct forum: http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vcgeneral
As Jack's suggestion, this forum is not the app code development forum, it is used to discuss the VS IDE usage.
Thanks,
Xuan,
Monday, February 24, 2014 11:41 AM