Win32: Excluding region of arbitrary size - not rectangular

Started by
4 comments, last by xllx_relient_xllx 18 years, 7 months ago
Is it possible? The only function I know of that can exclude part of a region is ExcludeClipRect. The problem with it is that if you want to exclude a region of an arbitrary size othar than rectangular, you can't, because you're limited to rectangles only. Here's what I'm trying to do in my app.. I'm currently working on a hit-test button - with regions. This button is rectangular round, drawn with RoundRect(). I want to exclude this button from being painted so it will not flicker when the window is resized. Using ExcludeClipRect does not yield the desired results because it excludes a rectangular button and makes my round rect button appear to have white pointy edges. Is there any function similar to ExcludeClipRect but for excluding regions of arbitrary (not rectagular) size? If not, what other function/s could I use to accomplish this task, if any? Thanks in advance, relient
Advertisement
Even if there were I don't think it would be advisable to use such functionality.

However, I _think_ what you are looking for is buffering of some sort, however, flicker-free controls can be quite the problem in windows, and buffering is the closest I've ever got to making controls flicker-free, I'm sure there are ways to make it completely flicker-free.


See Clipping Paths.
Okey dokey, thanks guys.

relient
i do it the reverse way, that is to say, i build up a new clipping region from only those pixels that i want shown.

i use CombineRgn to do this. for bitmap-based areas, i have my own function that creates a HRGN from the bitmap's or icon's non-transparent pixels.

then i use SelectClipRgn just prior to painting.
Very interesting. Thanks for the input man.

relient

Edit: I've succeeded in accomplishing my task by using CombineRgn and SelectClipRgn with the guidance of: Guide to WIN32 Regions by Paul Watt.


Ratings and gratitude to all those who chipped in.

[Edited by - xllx_relient_xllx on September 10, 2005 1:34:44 AM]

This topic is closed to new replies.

Advertisement