Round Button
-
Hi, I am creating a ownder draw button with Round Edges. I tried the bolw code for round edged in OnDraw() //make round corner CRgn rgn; CRect crt; GetClientRect(&crt); rgn.CreateRoundRectRgn( crt.left, crt.top, crt.right, crt.bottom, 13, 13); SetWindowRgn(rgn,1); Button is coming with round edges but If button repaints it is becoming rectanglular shape button. What shall I do?
-
Hi, I am creating a ownder draw button with Round Edges. I tried the bolw code for round edged in OnDraw() //make round corner CRgn rgn; CRect crt; GetClientRect(&crt); rgn.CreateRoundRectRgn( crt.left, crt.top, crt.right, crt.bottom, 13, 13); SetWindowRgn(rgn,1); Button is coming with round edges but If button repaints it is becoming rectanglular shape button. What shall I do?
Below is a link to Chris Maunder's class that turns rectangular buttons into round buttons. Round Buttons[^]
-
Hi, I am creating a ownder draw button with Round Edges. I tried the bolw code for round edged in OnDraw() //make round corner CRgn rgn; CRect crt; GetClientRect(&crt); rgn.CreateRoundRectRgn( crt.left, crt.top, crt.right, crt.bottom, 13, 13); SetWindowRgn(rgn,1); Button is coming with round edges but If button repaints it is becoming rectanglular shape button. What shall I do?
john5632 wrote:
Button is coming with round edges but If button repaints it is becoming rectanglular shape button. What shall I do?
I think your drawing the whole rectangular area of the button in OnDraw function. Draw only the round rectangular area of the button. OR Draw the button with the dialog background first and then draw the remaining things.