April 2nd, 1999, 06:27 PM
Hello!
I have an owner-drawn (derived from CButton) control in my dialog box. In it's PreSubclassWindow function, I set it a new region (elliptic region) using SetWindowRgn. And here's the problem: although the control looks elliptic in the dialog box (I checked it with Spy++), when I do a simple draw like this:
dc.FillSolidRect(&myRect, RGB(0, 0, 0));
(from within "CSpecialButton::OnPaint" or something alike)
the entire rectangle gets painted in black; not only the elliptic shape!! The same happens with other draw functions.
If you have any idea what might be wrong, please post me a response or E-Mail: zivayalon@hotmail.com
Thanx! Ziv
I have an owner-drawn (derived from CButton) control in my dialog box. In it's PreSubclassWindow function, I set it a new region (elliptic region) using SetWindowRgn. And here's the problem: although the control looks elliptic in the dialog box (I checked it with Spy++), when I do a simple draw like this:
dc.FillSolidRect(&myRect, RGB(0, 0, 0));
(from within "CSpecialButton::OnPaint" or something alike)
the entire rectangle gets painted in black; not only the elliptic shape!! The same happens with other draw functions.
If you have any idea what might be wrong, please post me a response or E-Mail: zivayalon@hotmail.com
Thanx! Ziv