in a dialog we have a gradient backgound but the controls take the color of the skin. We want to have control with transparent background.
I try to override the function _Renderimpl but the control have a grey backgound.
For information we redraw the backgournd of the cdialog with this code : (for having a gradient background)
CMYdialog::OnEraseBkgnd(CDC* pDC)
{
// return CDialog::OnEraseBkgnd(pDC);
CRect rect;
GetClientRect(&rect);
//int r1=121,g1=126,b1=150; //Any start color
//int r2=121,g2=126,b2=150; //Any stop color
int r1= 160, g1=180, b1 =225;
int r2= 160, g2=180, b2 =225;
for(int i=0;i<rect.Width();i++)
{
int r,g,b;
r = r1 + (i * (r2-r1) / rect.Width());
g = g1 + (i * (g2-g1) / rect.Width());
b = b1 + (i * (b2-b1) / rect.Width());
pDC->FillSolidRect(i,0,1,rect.Height(),RGB(r,g,b));
}
return TRUE;
}
Does someone have a solution ? thanks