Sign in to follow this  


Recommended Posts

In my app, I excluded a little rectangle for my input box but now my program won't let me draw/paint over the excluded region because I called ExcludeClipRect. So my question is: What function can I use to Include back the excluded region I clipped by calling ExcludeClipRect? This link at the very bottom, uses SelectClipRgn to remove the clipped area but I don't know how to implement it since it requires an HRGN; a handle to a region. The problem with this is that, my excluded region is stored in a RECT structure. How would I pass my RECT's coordinates to an HRGN handle or get a HRGN handle to my RECT structure which has the excluded region? How I'm using ExcludeClipRegion:
ExcludeClipRect((HDC)wParam, (fillRect.right >> 1) - (iBoxWidth >> 1),(fillRect.bottom >> 1) - (cyChar >> 1), 
(fillRect.right >> 1) + (iBoxWidth >> 1), 
(fillRect.bottom >> 1) + (cyChar >> 1));
// XXX.XX >> 1 is simply dividing by 2

I've tried MSDN, google and nothing gives. edit: I'm using C with the Win32 API.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this