Article ID: 946074 - Last Review: December 13, 2007 - Revision: 1.2

The display on a Windows Vista-based computer may become corrupted when you use the GetDC(NULL) function in a WPF-based application

Expand all | Collapse all

SYMPTOMS

Consider the following scenario:
  • You are running a Windows Vista-based computer.
  • An application uses the GetDC(NULL) function together with an exclusive-OR (XOR) raster operation to draw on the screen.
In this scenario, the display may become corrupted. For example, some artifacts may remain on the screen longer than expected.

CAUSE

This problem may occur if the Windows Aero feature is enabled. The Windows Aero feature makes extensive use of double buffering to draw on the screen.

WORKAROUND

To work around this issue, disable the Windows Aero feature. For example, set the Color Scheme option to Windows Vista Basic. To do this, follow these steps:
  1. Click Start
    Collapse this imageExpand this image
     Start button
    , type control panel in the Start Search box, and then click Control Panel in the Programs list.

    Collapse this imageExpand this image
     User Account Control permission
    If you are prompted for an administrator password or for confirmation, type your password, or click Continue.
  2. Double-click Personalization.
  3. Click Window Color and Appearance.
  4. Under Color Scheme, click Windows Vista Basic, and then click OK.

MORE INFORMATION

For more information about the GetDC function, visit the following MSDN Web site:
http://msdn2.microsoft.com/en-us/library/ms533241.aspx (http://msdn2.microsoft.com/en-us/library/ms533241.aspx)

APPLIES TO
  • Windows Vista Business
  • Windows Vista Enterprise
  • Windows Vista Home Premium
  • Windows Vista Ultimate
  • Windows Vista Business 64-bit Edition
  • Windows Vista Enterprise 64-bit Edition
  • Windows Vista Home Premium 64-bit Edition
  • Windows Vista Ultimate 64-bit Edition
Keywords: 
kbdisplay kbtshoot kbnofix kbprb KB946074
 

Article Translations