Advertisement Jump to content
Sign in to follow this  


This topic is 4986 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!