The information in this article applies to:
SYMPTOMSSetting a smaller clipping region in WM_PAINT by using SelectClipRgn() works fine; however, setting a larger clipping region seems to have no effect. GetClipBox() can be used to verify this after calling SelectClipRgn(). CAUSEWhen you call SelectClipRgn() within a BeginPaint()/EndPaint() block in an application's WM_PAINT case, the maximum size to which you can set your clipping region is the size of the update region of your paint structure. This is because the resulting clip region is the intersection of the update region and the region specified in the call to SelectClipRgn(). In other words, you can use SelectClipRgn() to shrink your update region, but not to grow it. This behavior is by design. RESOLUTIONInvalidate the clipping region area you want before calling BeginPaint(). For example:
Something similar could be done in the Microsoft Foundation Classes (MFC),
such as:
STATUSThis behavior is by design. MORE INFORMATION
This is addressed in the documentation for the Windows NT SDK version 3.1
[Section 20.1.5, "Window Regions" in Chapter 20, "Painting and Drawing" in
the "Microsoft Win32 Programmer's Reference, Volume 1" or in the Win32 API
Reference online help (search on "Window Regions")] which states:
Additional query words: 3.10 4.00 SelectClipRegion big small large
Keywords : kbNTOS350 kbNTOS351 kbNTOS400 kbWinOS95 kbDSupport kbSDKWin16 |
Last Reviewed: June 28, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |