SetWindowRgn and owner drawn buttons

I have a simple owner drawn button on a dialog. I am using a bitmap to draw the button. I am also using the SetWindowRgn method to set a non rectangular region for this button (the goal is to have a non rectangular button, with transparent areas on it background that cannot be clicked).

The setting of the region works fine, in that the button only responds to a click inside the set region. However I thought that windows would only draw the parts of the button within the defined window region. However the whole button is being drawn!

What else do I need to do to the button in order that only the areas in the set region are displayed.
[658 byte] By [SimonSadler] at [2007-11-18 1:36:00]
# 1 Re: SetWindowRgn and owner drawn buttons
Use SelectClipRgn when you draw bitmap on the button.
Alex F at 2007-11-10 8:53:57 >