SAMPLE: Drawing a Custom Border Around a Control WindowLast reviewed: February 15, 1996Article ID: Q66992 |
The information in this article applies to:
SUMMARYMicrosoft Windows is not designed to allow a control to draw its own custom border. If an application subclasses the control and draws a border during the processing of the WM_PAINT message, the control will not be clipped properly because the control does not determine the clipping when it draws outside its client area. The proper approach is to have the parent of the control draw the border during the processing of a WM_PAINT message. In this case, Windows will perform the appropriate clipping automatically. There is a sample application in the Microsoft Software Library called DROPSHAD that demonstrates this technique. This program shows how to create an edit control with a "drop shadow." The parent window of the edit control draws the drop shadow on the control's behalf. Download DROPSHAD.EXE, a self-extracting file, from the Microsoft Software Library (MSL) on the following services:
MORE INFORMATIONThe following three steps draw the drop shadow:
|
Additional reference words: 3.00 3.10 softlib DROPSHAD.EXE
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |