DOCERR: CS_PARENTDC Class Style Description IncorrectLast reviewed: December 2, 1996Article ID: Q111005 |
The information in this article applies to:
SUMMARYThe documentation relating to the CS_PARENTDC window class style in the Windows SDK versions 3.0 and 3.1 states that CS_PARENTDC "Gives the display context of the parent window to the window class." The documentation for the Win32 SDK contains a similar statement. These statements are incorrect.
MORE INFORMATIONA window with the CS_PARENTDC style bit will receive a regular device context (DC) from the system's cache of device contexts. CS_PARENTDC merely sets the clipping rectangle of the child to that of the parent so that the child can draw on the parent. It does not give the child the parent's DC or DC settings. CS_PARENTDC is used with all of Windows's standard controls such as edit controls and list boxes because it can help improve performance when drawing, especially in a dialog box. For example, dialog box units are not exact and if a child is drawing in a very small space it might accidentally draw outside its own border. This style provides a little room for error and prevents the child from being clipped unexpectedly.
|
KBCategory: kbui kbdocerr
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |