hello,
I have an exercise to build a simple GUI in MFC. I need to make few radio buttons which were change a background of my rectangle. Here is my code :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
void CDialogRisanje::OnPaint()
{
CPaintDC dc(this); // device context for painting
// TODO: Add your message handler code here
// Do not call CDialog::OnPaint() for painting messages
CRect r;
GetClientRect(r);
CBrush bela(RGB(255,255,255));
dc.SelectObject(&bela);
dc.Rectangle(r.Width()/2-320,r.Height()/2-200,r.Width()/2+130,r.Height()/2+200);
}
void CDialogRisanje::OnBnClickedRadio1()
{
}
Problem is that I don't know how to change a background with a press on radio button. Tnx for help.