BCGControlBar Pro for MFC
void CBCGPDrawManager::FillGradient ( CRect  rect,
COLORREF  colorStart,
COLORREF  colorFinish,
BOOL  bHorz = TRUE,
int  nStartFlatPercentage = 0,
int  nEndFlatPercentage = 0 
)

Fills a rectangular area with the gradient color.

Parameters
rectSpecifies a rectangular area to fill.
colorStartSpecifies the color to start.
colorFinishSpecifies the color to finish.
bHorzTRUE - horizontal gradient, FALSE - vertical gradient.
nStartFlatPercentageSpecifies the percent of rectangle to be filled by "flat" colorStart.
nEndFlatPercentageSpecifies the percent of rectangle to be filled by "flat" colorFinish.