DOCERR: CS_PARENTDC Class Style Description IncorrectLast reviewed: December 2, 1996 |
The information in this article applies to: Microsoft Windows Software Development Kit (SDK) versions 3.1 Microsoft Win32 Application Programming Interface (API) included with: - Microsoft Windows NT versions 3.5 and 3.51 - Microsoft Windows 95 version 4.0 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 |
Last reviewed: December 2, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.