The information in this article applies to:
SYMPTOMSWhen CreateRoundRectrRgn() is used to create a region with the shape of a rectangle that has rounded corners and RoundRect() is called with the same parameters to draw the same rectangle that has rounded corners, the calculated region does not match the drawn rectangle. The same can be said of the ellipses created by CreateEllipticRgn() and Ellipse(). CAUSEThis behavior is because of the design on Windows. The mismatch between fills and frames is because of the way that the boundaries and fills must be specified in order to get polygons to fit together properly. Windows NT duplicates this behavior for compatibility. RESOLUTION
Perform the fill first, then draw the frame. Some of the frame pixels will
overwrite fill pixels and some will not; however, there will be no gap
between the frame and the fill, and the fill will not extend past the
frame. Use CreateRoundRectRgn() or CreateEllipticRgn() for the fill and RoundRect() or Ellipse, respectively, for the frame. Use the same parameters for both the region API and the filled-shape API.
STATUSThis behavior is by design. Additional query words: 3.10 4.00
Keywords : kbNTOS350 kbNTOS351 kbNTOS400 kbSDKWin32 kbWinOS95 |
Last Reviewed: June 16, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |