Microsoft KB Archive/946074

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

Article ID: 946074

Article Last Modified on 12/13/2007

-

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

-



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 Startvistastartbutton.jpg], type control panel in the Start Search box, and then click Control Panel in the Programs list.

If you are prompted for an administrator password or for confirmation, type your password, or click Continue.
 * 1) Double-click Personalization.
 * 2) Click Window Color and Appearance.
 * 3) 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

Keywords: kbdisplay kbtshoot kbnofix kbprb KB946074

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.