How to Create Non-rectangular WindowsLast reviewed: September 29, 1995Article ID: Q125669 |
The information in this article applies to:
SUMMARYWindows 95 and Windows NT version 3.51 provide a new API called SetWindowRgn() that makes it easy for applications to create irregularly shaped windows.
MORE INFORMATIONIn previous versions of Windows and Windows NT, it was possible to create only rectangular windows. To simulate a non-rectangular window required a lot of work on the application developer's part. Besides handling all drawing for the window, the application was required to perform hit-testing and force underlying windows to repaint as necessary to refresh the "transparent" portions of the window. Windows 95 and Windows NT version 3.51 greatly simplify this by providing the SetWindowRgn function. An application can now create a region with any desired shape and use SetWindowRgn to set this as the clipping region for the window. Subsequent painting and mouse messages are limited to this region, and Windows automatically updates underlying windows that show through the non-rectangular window. The application need only paint the window as desired. For more information on using SetWindowRgn, see the Win32 API documentation.
|
Additional reference words: 4.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |