Using Device Contexts Across ThreadsLast reviewed: November 2, 1995Article ID: Q94236 |
The information in this article applies to:
A window created with the CS_OWNDC style retains its device context (DC) attributes across GetDC() calls. However, the DC attributes are not retained if the GetDC() calls are called from different threads. This is by design because DCs are thread-based. In the Win32 user interface, if the calling thread is not the owner of the window, then GetDC() returns a cache DC instead of the owned DC handle. To save attributes across threads, one must create a routine to initialize DC attributes, which is then called from threads not owning the given window.
|
Additional reference words: 3.10 3.50
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |