Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » profuis control with transparent background in colored cdialog Collapse All
Subject Author Date
Borremans Pierre Mar 8, 2010 - 2:15 AM

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;

    //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());
    return TRUE;

Does someone have a solution ? thanks

Borremans Pierre Mar 8, 2010 - 5:50 AM

ok i find a solution